summaryrefslogtreecommitdiff
path: root/builtins/110/reflect
blob: 8238fdc93fd785322bb3b8030084689cbcc599fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
((function reflect
   (signature float
     (parameters
       (declare (in) float i)
       (declare (in) float n))
     ((return (expression float -
	       (var_ref i)
	       (expression float *
		(constant float (2.0))
		(expression float *
		 (expression float dot
		  (var_ref n)
		  (var_ref i))
		 (var_ref n)))))))

   (signature vec2
     (parameters
       (declare (in) vec2 i)
       (declare (in) vec2 n))
     ((return (expression vec2 -
	       (var_ref i)
	       (expression vec2 *
		(constant float (2.0))
		(expression vec2 *
		 (expression float dot
		  (var_ref n)
		  (var_ref i))
		 (var_ref n)))))))

   (signature vec3
     (parameters
       (declare (in) vec3 i)
       (declare (in) vec3 n))
     ((return (expression vec3 -
	       (var_ref i)
	       (expression vec3 *
		(constant float (2.0))
		(expression vec3 *
		 (expression float dot
		  (var_ref n)
		  (var_ref i))
		 (var_ref n)))))))

   (signature vec4
     (parameters
       (declare (in) vec4 i)
       (declare (in) vec4 n))
     ((return (expression vec4 -
	       (var_ref i)
	       (expression vec4 *
		(constant float (2.0))
		(expression vec4 *
		 (expression float dot
		  (var_ref n)
		  (var_ref i))
		 (var_ref n)))))))

))