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
 

counting remainders and seeing them as a number

Previous Thread :: Next Thread 
justasimpletest is not online. justasimpletest
Joined: 07 Feb 2011
Total Posts: 733
31 Dec 2011 06:55 PM
say i do 9/2 the remainder is 1
how do i see it in general lua?

I want to do it for a decimal to binary convertor. And i dont want to store everything in a table...
Report Abuse
justasimpletest is not online. justasimpletest
Joined: 07 Feb 2011
Total Posts: 733
31 Dec 2011 07:08 PM
bump
Report Abuse
swmaniac is not online. swmaniac
Joined: 28 Jun 2008
Total Posts: 15773
31 Dec 2011 07:19 PM
print(9%2)
>1

% gets the remainder of the division of two integers.
Report Abuse
RA2lover is not online. RA2lover
Joined: 09 Nov 2008
Total Posts: 1254
31 Dec 2011 08:24 PM
you can also use math.mod()

print(math.mod(9,2))
Report Abuse
Chronok is not online. Chronok
Joined: 29 Dec 2011
Total Posts: 402
31 Dec 2011 08:34 PM
@RA2lover

Once again, I believe you mean math.fmod.

{ Chronok, novitiate scripter/programmer. }
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