Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | patatra |
Hye everyone,
Would you know what the equivalent in godot is of this:
Fract(x)
Good day,
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | patatra |
Hye everyone,
Would you know what the equivalent in godot is of this:
Fract(x)
Good day,
Reply From: | haydenv |
The equivalent is x - floor(x)
.
Another equivalent is fposmod(x, 1.0)
.
Both of the above also work if x = 0 or x < 0.
Source: GDScript built-in functions
Good day to you too.
Thank you, It helped me a lot
patatra | 2022-05-14 08:37