generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

[ Content Deleted ]

Previous Thread :: Next Thread 
ScriptOn is not online. ScriptOn
Joined: 22 Aug 2010
Total Posts: 10885
01 Feb 2013 09:34 PM
[ Content Deleted ]
Report Abuse
ScriptOn is not online. ScriptOn
Joined: 22 Aug 2010
Total Posts: 10885
01 Feb 2013 09:36 PM
[ Content Deleted ]
Report Abuse
ScriptOn is not online. ScriptOn
Joined: 22 Aug 2010
Total Posts: 10885
01 Feb 2013 09:37 PM
[ Content Deleted ]
Report Abuse
EchoReaper is not online. EchoReaper
Joined: 14 Oct 2008
Total Posts: 4323
01 Feb 2013 09:38 PM
Could you explain more? (i.e. Where the number starts at, is there a pattern that you want, etc)
Report Abuse
ScriptOn is not online. ScriptOn
Joined: 22 Aug 2010
Total Posts: 10885
01 Feb 2013 09:42 PM
[ Content Deleted ]
Report Abuse
YellowBrick1 is not online. YellowBrick1
Joined: 06 May 2009
Total Posts: 865
01 Feb 2013 09:42 PM
Roblox is not allowing me to post the solution.
Report Abuse
ScriptOn is not online. ScriptOn
Joined: 22 Aug 2010
Total Posts: 10885
01 Feb 2013 09:42 PM
[ Content Deleted ]
Report Abuse
EchoReaper is not online. EchoReaper
Joined: 14 Oct 2008
Total Posts: 4323
01 Feb 2013 09:45 PM
Oh, as in just rounding it to a different decimal place. Don't know if there's a function for it, but perhaps you could convert the number to a string, and then find the number after the last place you want it to be able to go, and if it's >= 5, make the previous number++. That's about all I can think of.
Report Abuse
ScriptOn is not online. ScriptOn
Joined: 22 Aug 2010
Total Posts: 10885
01 Feb 2013 09:45 PM
[ Content Deleted ]
Report Abuse
EchoReaper is not online. EchoReaper
Joined: 14 Oct 2008
Total Posts: 4323
01 Feb 2013 09:46 PM
And drop the rest off of the string of course.
Report Abuse
EchoReaper is not online. EchoReaper
Joined: 14 Oct 2008
Total Posts: 4323
01 Feb 2013 09:46 PM
Or that... Much more efficient than mine.
Report Abuse
ScriptOn is not online. ScriptOn
Joined: 22 Aug 2010
Total Posts: 10885
01 Feb 2013 09:47 PM
[ Content Deleted ]
Report Abuse
ScriptOn is not online. ScriptOn
Joined: 22 Aug 2010
Total Posts: 10885
01 Feb 2013 09:48 PM
[ Content Deleted ]
Report Abuse
StygianBlade is not online. StygianBlade
Joined: 15 Sep 2011
Total Posts: 426
01 Feb 2013 10:04 PM
local floor, ceil = math.floor, math.ceil
function round(n, e)
local rounded = n*10^e
rounded = rounded%1 - .5 >= 0 and ceil(rounded) or floor(rounded)
return rounded/10^e
end

print(round(4.23466, 3))
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image