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

upload
author NOBUYASU Oshiro
date Mon, 12 Jul 2010 08:01:12 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/webGL/dandy/resources/sankaku.c~	Mon Jul 12 08:01:12 2010 +0900
@@ -0,0 +1,26 @@
+mycos = [];
+mysin = [];
+
+function Mycos(c)
+{
+    c %= 360;
+    if(c < 0)
+	c += 360;
+    if((c <= 180))
+	return (mycos[c]);
+    if(c > 180)
+	return (mycos[180 - (c - 180)]);
+    return 0;
+}
+
+function Mysin(c)
+{
+    c %= 360;
+    if( c < 0)
+	c += 360;
+    if(c <= 180)
+	return (mysin[c]);
+    if(c > 180)
+	return (mysin[180 - (c - 180)] * -1);
+    return 0;
+}