comparison webGL/dandy/resources/sankaku.c~ @ 11:680b5b0cd1e4

upload
author NOBUYASU Oshiro
date Mon, 12 Jul 2010 08:01:12 +0900
parents
children
comparison
equal deleted inserted replaced
10:a959cdca5b62 11:680b5b0cd1e4
1 mycos = [];
2 mysin = [];
3
4 function Mycos(c)
5 {
6 c %= 360;
7 if(c < 0)
8 c += 360;
9 if((c <= 180))
10 return (mycos[c]);
11 if(c > 180)
12 return (mycos[180 - (c - 180)]);
13 return 0;
14 }
15
16 function Mysin(c)
17 {
18 c %= 360;
19 if( c < 0)
20 c += 360;
21 if(c <= 180)
22 return (mysin[c]);
23 if(c > 180)
24 return (mysin[180 - (c - 180)] * -1);
25 return 0;
26 }