Difference between revisions of "Integer Divide Operator"

From GiderosMobile
(added another example)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
 
 
<!-- GIDEROSOBJ:Integer Divide Operator -->
 
<!-- GIDEROSOBJ:Integer Divide Operator -->
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/>
+
'''Supported platforms:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/>
'''<translate>Available since</translate>:''' Gideros 2017.10<br/>
+
'''Available since:''' Gideros 2017.10<br/>
=== <translate>Description</translate> ===
+
 
<translate><br />
+
=== Description ===
Divide a number to a whole number.<br /><br />
+
Divide a number to a whole number.
 +
 
 +
a=b '''//''' c &emsp; put the integer result of divide 'b' by 'c' into 'a'
 +
 
 +
=== Examples ===
 +
'''Simple example'''
 +
<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 /></translate>
 
=== <translate>Examples</translate> ===
 
'''Simple example'''<br/>
 
<source lang="lua">
 
a=b//c -- faster than a=math.floor(b/c)</source>
 
 
{|-
 
{|-
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
=== <translate>Methods</translate> ===
+
=== Methods ===
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
=== <translate>Events</translate> ===
+
=== Events ===
=== <translate>Constants</translate> ===
+
=== Constants ===
 
|}
 
|}
  
 
{{GIDEROS IMPORTANT LINKS}}
 
{{GIDEROS IMPORTANT LINKS}}

Revision as of 01:23, 1 December 2020

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

Simple example

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!)

Methods

Events

Constants