|
|
(6 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
| __NOTOC__ | | __NOTOC__ |
− | <!-- GIDEROSOBJ:Integer Divide Operator -->
| + | '''Supported platforms:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/> |
− | '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/> | + | '''Available since:''' Gideros 2017.10<br/> |
− | '''<translate>Available since</translate>:''' Gideros 2017.10<br/> | |
− | === <translate>Description</translate> ===
| |
− | <translate><br />
| |
− | Divide a number to a whole number.<br /><br />
| |
| | | |
− | a=b<b> // </b>c   Put the integer result of divide 'b' by 'c' into 'a'.<br /></translate> | + | === Description === |
− | === <translate>Examples</translate> === | + | Divide a number to a whole number. |
− | '''Simple example'''<br/>
| + | |
− | <source lang="lua"> | + | a=b '''//''' c, put the integer result of divide 'b' by 'c' into 'a' |
− | a=b//c -- faster than a=math.floor(b/c)</source> | + | |
− | {|-
| + | === Examples === |
− | | style="width: 50%; vertical-align:top;"|
| + | <syntaxhighlight lang="lua"> |
− | === <translate>Methods</translate> === | + | a=b//c -- faster than a=math.floor(b/c) |
− | | style="width: 50%; vertical-align:top;"|
| + | </syntaxhighlight> |
− | === <translate>Events</translate> ===
| + | |
− | === <translate>Constants</translate> ===
| + | '''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}} |
Supported platforms:
Available since: Gideros 2017.10
Description
Divide a number to a whole number.
a=b // c, put the integer result of divide 'b' by 'c' into 'a'
Examples
a=b//c -- faster than a=math.floor(b/c)
Make an integer out of any numbers
b=5.123
a=b//1 -- result: a=5 (unique to Gideros!)