Convert to floating number without killing performance
By xyz on 2 weeks ago|0 comment||
0
Often we use math.floor, math.ceil and math.round for eliminating decimals. Instead of using them use “~~” to eliminate decimals for a value.
It is also helpful in increasing performance when it comes to micro optimizations in a code.
// use
~~ (math.random*100)
// instead of
math.round(math.random*100)
Add a Comment
Comments
Comments MIA, jokes needed ASAP. Add yours! 😄