Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: wheretheidivides on January 24, 2015, 01:01:15 AM

Title: Round
Post by: wheretheidivides on January 24, 2015, 01:01:15 AM
I'd like to see a rounder.  So you have a number (int or float) and you want to round it.  geez, now you have to do compares and all.  It'd be neat to be able to put the variable in and decide the rounding.

So I have a float called 'number'.  It is between 0 and 1 for music sound.  There is a clamp so it never goes higher or lower than 0 or 1.  When using a mouse, you can drag it and get detailed numbers but when using a joystick, I increment by 5%.  So what happens if it was 9%?  Then incrementing to 14%.  I'd rather it be 10 or 15.  So the 'number' when rounded to the nearest '5' would make it 10.

Fairly easy to do but I have no idea how to make actions myself.
Title: Re: Round
Post by: djaydino on January 25, 2015, 09:31:06 AM
float round exits already search float round on the EcoSystem (https://hutonggames.fogbugz.com/default.asp?W1181)
Title: Re: Round
Post by: Lane on January 26, 2015, 10:40:53 AM
Maybe this..

http://hutonggames.com/playmakerforum/index.php?topic=9350.0