Author Topic: [SOLVED] Rounding an output?  (Read 452 times)

Hey all, looking for a bit of help with this. So I'm doing something with view angles and made a function to see what getTransform outputs when the player changes where they're looking in 360 small increments, giving me a long list of numbers between 0 and 2pi as the value. Now I'm trying to get that number to always round to 2 decimal places in a new function.

Is there a way I can separate each character in this value and then use a couple getWords to round it? Or a better way to do it? :cookieMonster:

Thanks all, it's for a cool idea I swear
« Last Edit: February 16, 2016, 07:00:01 PM by Jervan »

%val = mFloatLength(%val, 2);

You can also use mRadToDeg(%val) to turn the rotation to degrees