How can i truncate not with casual number like 1, 2, 3 but directly with decimal syntax?
For example:
- I have 4 and decimal to 1 so truncate to 4.
- I have 1.5 and decimal to 1 so truncate to 1.
- I have 1.5689 and decimal 0.01 so truncate to 1.56.
- I have 1.7954 and decimal 0.001 so truncate to 1.795.
I don't know if such a function exist, but i imagine something like this:
round(1.5689, 0.01)
-> 1.56
I don't even know how we can call that lol ...