Snap position and scale to round numbers
Hi all,
I'm trying to create a jsfl scirpt that changes the element by:
1. Rounding the scaleX and scaleY to a number with 2 decimal places (i.e. integer percent)
2. Rounding the position x and y to a integer number (i.e. snap to pixel)
I've tried round/ceil/floor/toFixed, but everytime I end up with a float number similar to .9978.
I'm aware by the JS limitations when working with float numbers, but everything is OK when trying to set up the values manually from the Animate's UI.
Does anyone know a proper solution for doing this through script?
Thank you very much.
