• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1((function modf
2   (signature float
3     (parameters
4       (declare (in)  float x)
5       (declare (out) float i))
6     ((declare () float t)
7      (assign (constant bool (1)) (x) (var_ref t)
8                                      (expression float trunc (var_ref x)))
9      (assign (constant bool (1)) (x) (var_ref i) (var_ref t))
10      (return (expression float - (var_ref x) (var_ref t)))))
11
12   (signature vec2
13     (parameters
14       (declare (in)  vec2 x)
15       (declare (out) vec2 i))
16     ((declare () vec2 t)
17      (assign (constant bool (1)) (xy) (var_ref t)
18                                       (expression vec2 trunc (var_ref x)))
19      (assign (constant bool (1)) (xy) (var_ref i) (var_ref t))
20      (return (expression vec2 - (var_ref x) (var_ref t)))))
21
22   (signature vec3
23     (parameters
24       (declare (in)  vec3 x)
25       (declare (out) vec3 i))
26     ((declare () vec3 t)
27      (assign (constant bool (1)) (xyz) (var_ref t)
28                                        (expression vec3 trunc (var_ref x)))
29      (assign (constant bool (1)) (xyz) (var_ref i) (var_ref t))
30      (return (expression vec3 - (var_ref x) (var_ref t)))))
31
32   (signature vec4
33     (parameters
34       (declare (in)  vec4 x)
35       (declare (out) vec4 i))
36     ((declare () vec4 t)
37      (assign (constant bool (1)) (xyzw) (var_ref t)
38                                         (expression vec4 trunc (var_ref x)))
39      (assign (constant bool (1)) (xyzw) (var_ref i) (var_ref t))
40      (return (expression vec4 - (var_ref x) (var_ref t)))))
41))
42