|
| 25 Dec 2013 11:51 AM |
In java, there's a % thing that gives you the remainder when you divide. Does ROBLOX have this?
EX. 5%2=1 4%2=0 25%9=7 --9 Goes into 25, 2 times. 25-(9*2)=7 |
|
|
| Report Abuse |
|
|
mic144
|
  |
| Joined: 14 Oct 2009 |
| Total Posts: 1598 |
|
|
| 25 Dec 2013 11:55 AM |
Roblox should give you the value+remainders unless you rounded up/down.
-- $$ Get on my level, here use this ladder. Don't fall down on the way up! $$ -- |
|
|
| Report Abuse |
|
|
| |
|
TaaRt
|
  |
| Joined: 26 Apr 2009 |
| Total Posts: 5039 |
|
|
| 25 Dec 2013 11:56 AM |
| Can't imagine a language without Modulo |
|
|
| Report Abuse |
|
|
StBashkir
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26171 |
|
|
| 25 Dec 2013 11:59 AM |
There's also this really nice math function that can split a number and a decimal - which I find just interesting.
local int, float = math.modf(5.255346534); print(int, float); >5 .255346534
|
|
|
| Report Abuse |
|
|
| |
|
TaaRt
|
  |
| Joined: 26 Apr 2009 |
| Total Posts: 5039 |
|
|
| 25 Dec 2013 12:03 PM |
| If there's anything ROBLOX should learn from java it is += and -= |
|
|
| Report Abuse |
|
|
|
| 25 Dec 2013 12:04 PM |
| Yeah, I get tired of having to make a bunch of variables or typing the same things twice... |
|
|
| Report Abuse |
|
|
shonclub
|
  |
| Joined: 05 Sep 2009 |
| Total Posts: 1331 |
|
| |
|