ホーム » Linux » 弦と矢と半径 – 3

2020年5月
 12
3456789
10111213141516
17181920212223
24252627282930
31  

カテゴリー

アーカイブ

ブログ統計情報

  • 77,353 アクセス



弦と矢と半径 – 3

JavaScript は html に埋め込んだ.

<!DOCTYPE html>
<html	lang="ja">
	<head>
		<meta	charset="UTF-8"	/>
		<meta	name="viewport"   	content="width=device-width,initial-scale=1.0">
		<title	>JavaScript</title>
		</head>
	<body>
		<script>

			function	r_cs	(c , s)		{	return	(        ( c*c )  / ( 8*s )  +  s/2 ) ;		}
			function	s_rc	(r , c)		{	return	( r-Math.sqrt(r*r - (c/2)*(c/2) )   ) ;		}
			function	c_rs	(r , s)		{	return	(   Math.sqrt(r*r - (r-s)*(r-s) )*2 ) ;		}

			document.write	("6 1 5") ; 	document.write	("<br/>\r\n") ;
			document.write	(r_cs(6,1)) ;	document.write	("<br/>\r\n") ;
			document.write	(s_rc(5,6)) ;	document.write	("<br/>\r\n") ;
			document.write	(c_rs(5,1)) ;	document.write	("<br/>\r\n") ;
			document.write	("") ;      	document.write	("<br/>\r\n") ;

			document.write	("8 2 5") ; 	document.write	("<br/>\r\n") ;
			document.write	(r_cs(8,2)) ;	document.write	("<br/>\r\n") ;
			document.write	(s_rc(5,8)) ;	document.write	("<br/>\r\n") ;
			document.write	(c_rs(5,2)) ;	document.write	("<br/>\r\n") ;
			document.write	("") ;      	document.write	("<br/>\r\n") ;

			</script>
		</body>
	</html>

動作は,
https://mish.myds.me/…/r_cs/3/
html に JavaScript を埋め込み

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

コメントする

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

%d人のブロガーが「いいね」をつけました。