summaryrefslogtreecommitdiffstats
path: root/builtins/110/cross
blob: deb2f952bfc31bd76f28fa6aa996ce5c17774c23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
((function cross
   (signature vec3
     (parameters
       (declare (in) vec3 arg0)
       (declare (in) vec3 arg1))
     ((declare () vec3 t)
      (assign (constant bool (1)) (swiz x (var_ref t))
              (expression float - (expression float * (swiz y (var_ref arg0)) (swiz z (var_ref arg1)))
	                          (expression float * (swiz y (var_ref arg1)) (swiz z (var_ref arg0)))))
      (assign (constant bool (1)) (swiz y (var_ref t))
              (expression float - (expression float * (swiz z (var_ref arg0)) (swiz x (var_ref arg1)))
	                          (expression float * (swiz z (var_ref arg1)) (swiz x (var_ref arg0)))))
      (assign (constant bool (1)) (swiz z (var_ref t))
              (expression float - (expression float * (swiz x (var_ref arg0)) (swiz y (var_ref arg1)))
	                          (expression float * (swiz x (var_ref arg1)) (swiz y (var_ref arg0)))))
      (return (var_ref t))))
))