Difference between revisions of "Integer Divide Operator"
From GiderosMobile
| (10 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
| − | '''Supported platforms:''' android | + | '''Supported platforms:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform linux.png]]<br/> |
'''Available since:''' Gideros 2017.10<br/> | '''Available since:''' Gideros 2017.10<br/> | ||
| − | |||
| − | |||
| − | |||
| − | a=b | + | === Description === |
| − | === | + | Divide a number to a whole number. |
| − | + | ||
| − | < | + | a=b '''//''' c, put the integer result of divide 'b' by 'c' into 'a' |
| − | a=b//c -- faster than a=math.floor(b/c)</ | + | |
| − | + | === Examples === | |
| − | + | <syntaxhighlight lang="lua"> | |
| − | == | + | a=b//c -- faster than a=math.floor(b/c) |
| − | + | </syntaxhighlight> | |
| − | + | ||
| − | + | '''Make an integer out of any numbers''' | |
| − | + | <syntaxhighlight lang="lua"> | |
| + | b=5.123 | ||
| + | a=b//1 -- result: a=5 (unique to Gideros!) | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | {{GIDEROS IMPORTANT LINKS}} | ||