Is there any way to or truncate a float within the Slint language? #1708
Answered
by
tronical
DeonteVanterpool
asked this question in
Q&A
-
I want to do math on struct fields and have the UI display the result as an integer rather than the float. Should I just have Rust do the math, or is there a way to truncate within Slint? I realized that creating a new integer property with the expression rounds instead of truncating |
Beta Was this translation helpful? Give feedback.
Answered by
tronical
Oct 5, 2022
Replies: 1 comment 1 reply
-
There's |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
DeonteVanterpool
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's
Math.floor
(and other functions inMath
), but there's notrunc
yet. Would that work for you?