summaryrefslogtreecommitdiff
path: root/builtins/110
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-05-03 22:11:17 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-05-14 16:34:46 -0700
commit57e7da173e8d38bf0c95ded535cdf1b12a00a1a2 (patch)
treedcab2273d6547f95a4df5a623c7af4c196cab09c /builtins/110
parent6a9b1e1f06c2859f0c20375189c6ff02ed769d1a (diff)
Implement "sin" and "cos" builtins via new expression operators.
Diffstat (limited to 'builtins/110')
-rw-r--r--builtins/110/cos21
-rw-r--r--builtins/110/sin21
2 files changed, 42 insertions, 0 deletions
diff --git a/builtins/110/cos b/builtins/110/cos
new file mode 100644
index 0000000000..88f266eccb
--- /dev/null
+++ b/builtins/110/cos
@@ -0,0 +1,21 @@
+((function cos
+ (signature float
+ (parameters
+ (declare (in) float angle))
+ ((return (expression float cos (var_ref angle)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 angle))
+ ((return (expression vec2 cos (var_ref angle)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 angle))
+ ((return (expression vec3 cos (var_ref angle)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 angle))
+ ((return (expression vec4 cos (var_ref angle)))))
+))
diff --git a/builtins/110/sin b/builtins/110/sin
new file mode 100644
index 0000000000..e6009d8ef1
--- /dev/null
+++ b/builtins/110/sin
@@ -0,0 +1,21 @@
+((function sin
+ (signature float
+ (parameters
+ (declare (in) float angle))
+ ((return (expression float sin (var_ref angle)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 angle))
+ ((return (expression vec2 sin (var_ref angle)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 angle))
+ ((return (expression vec3 sin (var_ref angle)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 angle))
+ ((return (expression vec4 sin (var_ref angle)))))
+))