Created
December 3, 2019 09:55
-
-
Save shakdwipeea/d5dcf9f883450eee6b8e94a4421f0653 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define data (list 0.0 -0.5 1.0 0.0 0.0 | |
0.5 0.5 0.0 1.0 0.0 | |
-0.5 0.5 0.0 0.0 1.0)) | |
(define buffer-data (let (v (make-u8vector (* 15 4))) | |
(let lp ((rest data) (i 0)) | |
(match rest | |
([x . rest] | |
(displayln "i:" i "x:" x) | |
(u8vector-float-set! v i x big) | |
(lp rest (1+ i))) | |
(else v)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment