small fixes in stdlib

This commit is contained in:
Felix Brendel
2019-09-23 22:44:08 +02:00
parent 088127387e
commit 97f45f166f
4 changed files with 14 additions and 14 deletions
+5 -6
View File
@@ -1,18 +1,17 @@
(define-module math
:imports ("oo.slime")
:exports (pi abs sqrt make-vector3)
(import "oo.slime")
(define pi
"Tha famous circle constant."
:doc "Tha famous circle constant."
3.14159265)
(define (abs x)
"Accepts one argument and returns the absoulte value of it"
:doc "Accepts one argument and returns the absoulte value of it"
(if (> x 0) x (- x)))
(define (sqrt x)
"Accepts one argument and returns the square root of it"
:doc "Accepts one argument and returns the square root of it"
(** x 0.5))
(define-class (vector3 x y z)
@@ -58,4 +57,4 @@
(- (* (-> other y) x) (* (-> other x) y))))
(define (print)
(printf :sep "" "[vector3] (" x " " y " " z ")"))))
(print :sep "" "[vector3] (" x " " y " " z ")"))))