Files
jak-project/test/goalc/source_templates/with_game/test-set-u64-from-float.gc
T
2021-08-12 20:09:25 -04:00

9 lines
338 B
Common Lisp

(let ((a (new 'stack-no-clear 'array 'float 4))
(b (new 'stack-no-clear 'array 'uint64 2))
)
(set! (-> b 0) #xbbbbbbbbbbbbbbbb)
(set! (-> a 0) 12.0)
(set! (-> b 0) (the-as uint (- (-> a 0))))
(format #t "~f #x~X #x~X #x~X~%" (-> b 0) (-> b 0) (-> (the-as (pointer uint32) b) 0) (-> (the-as (pointer uint32) b) 1))
)