diff options
-rw-r--r-- | chickadee/graphics/seagull.scm | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/chickadee/graphics/seagull.scm b/chickadee/graphics/seagull.scm index 8287b71..cc51b37 100644 --- a/chickadee/graphics/seagull.scm +++ b/chickadee/graphics/seagull.scm @@ -122,7 +122,7 @@ (memq x '(int->float float->int))) (define (math-function? x) - (memq x '(abs sqrt min max mod floor ceil sin cos tan clamp mix length))) + (memq x '(abs sqrt pow min max mod floor ceil sin cos tan clamp mix length))) (define (vertex-primitive-call? x) #f) @@ -2327,6 +2327,17 @@ (predicate:or (predicate:= a type:int) (predicate:= a type:float))))))) + (define type:pow + (let ((a (fresh-variable-type))) + (list (type-scheme + (list a) + (qualified-type + (function-type (list a a) (list a)) + (predicate:or + (predicate:= a type:float) + (predicate:= a type:vec2) + (predicate:= a type:vec3) + (predicate:= a type:vec4))))))) (define type:min/max (let ((a (fresh-variable-type))) (list (type-scheme @@ -2382,6 +2393,7 @@ (length . ,type:length) (abs . ,type:abs) (sqrt . ,type:sqrt) + (pow . ,type:pow) (min . ,type:min/max) (max . ,type:min/max) (sin . ,type:trig) |