Difference between revisions of "Integer Divide Operator"

From GiderosMobile
(Created page with "__NOTOC__ '''Supported platforms:''' <br/> '''Available since:''' Gideros 2017.10<br/> === Description === <br /> Divide a number to a whole number.<br /><br /> a=b<b> // </b...")
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''Supported platforms:''' <br/>
+
'''Supported platforms:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/>
 
'''Available since:''' Gideros 2017.10<br/>
 
'''Available since:''' Gideros 2017.10<br/>
 +
 
=== Description ===
 
=== Description ===
<br />
+
Divide a number to a whole number.
Divide a number to a whole number.<br /><br />
+
 
 +
a=b '''//''' c &emsp; put the integer result of divide 'b' by 'c' into 'a'
 +
 
 +
=== Examples ===
 +
<source lang="lua">
 +
a=b//c -- faster than a=math.floor(b/c)
 +
</source>
 +
 
 +
'''Make an integer out of any numbers'''
 +
<source lang="lua">
 +
b=5.123
 +
a=b//1 -- result: a=5 (unique to gideros!)
 +
</source>
  
a=b<b> // </b>c &emsp; Put the integer result of divide 'b' by 'c' into 'a'.<br />
+
{{GIDEROS IMPORTANT LINKS}}
{|-
 
| style="width: 50%;"|
 
=== Methods ===
 
| style="width: 50%;"|
 
=== Events ===
 
=== Constants ===
 
|}
 

Revision as of 00:25, 30 November 2022

Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.png
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!)