mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Implement opt Q for fixed-point precision, and q literals (e.g. 12.34q8) (#958)
Fixes #957 Co-authored-by: ISSOtm <eldredhabert0@gmail.com>
This commit is contained in:
@@ -12,3 +12,11 @@ fl = 6.283185
|
||||
|
||||
fr = MUL(20.0, 0.32)
|
||||
println "32% of 20 = {f:fr} (~{.2f:fr}) (~~{.0f:fr})"
|
||||
|
||||
q8 = 1.25q8
|
||||
q16 = 1.25Q16
|
||||
q24 = 1.25q.24
|
||||
println "Q8 ${x:q8} Q16 ${x:q16} Q24 ${x:q24}"
|
||||
|
||||
qerr = 1.25q32
|
||||
println qerr
|
||||
|
||||
Reference in New Issue
Block a user