diff options
-rw-r--r-- | chickadee/math.scm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/chickadee/math.scm b/chickadee/math.scm index b695e92..050dac1 100644 --- a/chickadee/math.scm +++ b/chickadee/math.scm @@ -23,7 +23,9 @@ clamp min max - lerp) + lerp + degrees->radians + radians->degrees) #:replace (min max)) (define pi 3.14159265358979323846) @@ -65,3 +67,9 @@ actually less than MAX." (define-inlinable (lerp start end alpha) (+ (* start (- 1.0 alpha)) (* end alpha))) + +(define-inlinable (degrees->radians degrees) + (/ (* pi degrees) 180.0)) + +(define-inlinable (radians->degrees radians) + (/ (* 180.0 radians) pi)) |