mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-22 03:02:06 +00:00
Improve string/interpolation formatting (#1491)
- The '#' component for type 's' now escapes the string characters - The '#' component for type 'f' now prints a precision suffix - The new 'q' component specifies a precision value
This commit is contained in:
@@ -16,7 +16,8 @@ def fr = MUL(20.0, 0.32)
|
||||
def q8 = 1.25q8
|
||||
def q16 = 1.25Q16
|
||||
def q24 = 1.25q.24
|
||||
println "Q8 ${x:q8} Q16 ${x:q16} Q24 ${x:q24}"
|
||||
println "{#f:q8} {#f:q16} {#f:q24}"
|
||||
println "Q8 {#x:q8} Q16 {#x:q16} Q24 {#x:q24}"
|
||||
|
||||
def qerr = 1.25q32
|
||||
println qerr
|
||||
println "{q0f:qerr}"
|
||||
|
||||
Reference in New Issue
Block a user