1 | math.sin( x ) ;0 g. r0 L1 G0 c" B4 l' K' \ ' R+ H0 U( }: _* k- D7 p0 Q |
1, ~( G+ ?+ A* S* E! d: O$ G3 d 2 3 4 5$ q b& G/ u3 m4 k! w5 }$ u5 S( f I 6% `, [- g+ m' s0 e, n0 w8 q 7 8 9 106 {3 N9 t( ~) r. k6 V$ ` 116 |, K2 ^5 w8 q/ ~# S 12 13$ V: g! {# y ? u: c f! `' h 144 M4 Z. ~2 M0 J! w5 {/ O 15 16' @3 E: O. D) d4 B2 r 17 18 19. K/ [9 m7 z7 Q; W& ~ 20 21! B. I h8 f0 b8 k1 o | <html>( u- D; ^( |$ Y3 ]. ~. ] <head>- ?* g1 u3 o) g$ C <title>javascript math sin() method</title> </head>- T6 o: s% t: t" \; h <body>" x, j" Y" {# n1 v/ f. M- _ <script type="text/javascript">+ O' D0 L& |4 L: x3 w0 \$ | ) y* {3 q/ \! V8 @" A& x8 @ var value = math.sin( 0.5 ); document.write("first test value : " + value );2 x! |: ~. ^. m- Z- G1 l z5 J; M var value = math.sin( 90 );+ Y! |9 Y7 s1 D" y% l document.write("<br />second test value : " + value );. `' ~+ |0 b! d( v var value = math.sin( 1 );% {0 ^$ m% B2 ^# y+ t) z [ document.write("<br />third test value : " + value ); var value = math.sin( math.pi/2 );' r( j4 c" y5 T9 \* @+ X6 ` document.write("<br />fourth test value : " + value ); </script> </body> </html> z! p% ^' w3 A% h0 Q. S2 } |
1: G3 p1 }# t: b [: h 2" o' P4 r" ~: i( b9 S 39 \+ F8 Y" E9 t6 E 4 | first test value : 0.479425538604203. {" t, ~- i0 ~( b4 F second test value : 0.89399666360055782 m) N0 k- H a. w( t third test value : 0.8414709848078965 fourth test value : 1 |
欢迎光临 得知互动 (https://bbs.dezhifl.com/) | Powered by Discuz! X3.4 |