using stdint types
This commit is contained in:
+6
-6
@@ -15,17 +15,17 @@
|
||||
(** x 0.5))
|
||||
|
||||
(define-class (vector3 x y z)
|
||||
(define (set-x new-x) (mutate x new-x))
|
||||
(define (set-y new-y) (mutate y new-y))
|
||||
(define (set-z new-z) (mutate z new-z))
|
||||
(define (set-x new-x) (mutate! x new-x))
|
||||
(define (set-y new-y) (mutate! y new-y))
|
||||
(define (set-z new-z) (mutate! z new-z))
|
||||
|
||||
(define (length)
|
||||
(** (+ (* x x) (* y y) (* z z)) 0.5))
|
||||
|
||||
(define (scale fac)
|
||||
(mutate x (* fac x))
|
||||
(mutate y (* fac y))
|
||||
(mutate z (* fac z))
|
||||
(mutate! x (* fac x))
|
||||
(mutate! y (* fac y))
|
||||
(mutate! z (* fac z))
|
||||
fac)
|
||||
|
||||
(define (add other)
|
||||
|
||||
Reference in New Issue
Block a user