Difference between revisions of "Math"

From GiderosMobile
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 +
<!-- GIDEROSOBJ:math -->
 
'''<translate>Supported platforms</translate>:''' [[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/>
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
Line 7: Line 8:
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Methods</translate> ===
 
=== <translate>Methods</translate> ===
[[Special:MyLanguage/math.abs|math.abs]] ''<translate>returns absolute value of v</translate>''<br/>
+
[[Special:MyLanguage/math.abs|math.abs]] ''<translate>returns absolute value of v</translate>''<br/><!-- GIDEROSMTD:math.abs -->
[[Special:MyLanguage/math.acos|math.acos]] ''<translate>returns arc cosine value of v in radians</translate>''<br/>
+
[[Special:MyLanguage/math.acos|math.acos]] ''<translate>returns arc cosine value of v in radians</translate>''<br/><!-- GIDEROSMTD:math.acos -->
[[Special:MyLanguage/math.asin|math.asin]] ''<translate>returns arc sine value of v in radians</translate>''<br/>
+
[[Special:MyLanguage/math.asin|math.asin]] ''<translate>returns arc sine value of v in radians</translate>''<br/><!-- GIDEROSMTD:math.asin -->
[[Special:MyLanguage/math.atan|math.atan]] ''<translate>returns arc tangent value of v in radians</translate>''<br/>
+
[[Special:MyLanguage/math.atan|math.atan]] ''<translate>returns arc tangent value of v in radians</translate>''<br/><!-- GIDEROSMTD:math.atan -->
[[Special:MyLanguage/math.atan2|math.atan2]] ''<translate>returns arc tangent value of v1/v2 in radians</translate>''<br/>
+
[[Special:MyLanguage/math.atan2|math.atan2]] ''<translate>returns arc tangent value of v1/v2 in radians</translate>''<br/><!-- GIDEROSMTD:math.atan2 -->
[[Special:MyLanguage/math.ceil|math.ceil]] ''<translate>returns smallest integer &gt;= v</translate>''<br/>
+
[[Special:MyLanguage/math.ceil|math.ceil]] ''<translate>returns smallest integer &gt;= v</translate>''<br/><!-- GIDEROSMTD:math.ceil -->
[[Special:MyLanguage/math.cos|math.cos]] ''<translate>returns cosine value of angle rad</translate>''<br/>
+
[[Special:MyLanguage/math.cos|math.cos]] ''<translate>returns cosine value of angle rad</translate>''<br/><!-- GIDEROSMTD:math.cos -->
[[Special:MyLanguage/math.deg|math.deg]] ''<translate>returns angle in degrees of radians rad</translate>''<br/>
+
[[Special:MyLanguage/math.deg|math.deg]] ''<translate>returns angle in degrees of radians rad</translate>''<br/><!-- GIDEROSMTD:math.deg -->
[[Special:MyLanguage/math.exp|math.exp]] ''<translate>returns e^v</translate>''<br/>
+
[[Special:MyLanguage/math.exp|math.exp]] ''<translate>returns e^v</translate>''<br/><!-- GIDEROSMTD:math.exp -->
[[Special:MyLanguage/math.floor|math.floor]] ''<translate>returns largest integer &lt;= v</translate>''<br/>
+
[[Special:MyLanguage/math.floor|math.floor]] ''<translate>returns largest integer &lt;= v</translate>''<br/><!-- GIDEROSMTD:math.floor -->
[[Special:MyLanguage/math.fmod|math.fmod]] ''<translate>returns remainder of v1/v2 which is v1 - iV2 for some integer i</translate>''<br/>
+
[[Special:MyLanguage/math.fmod|math.fmod]] ''<translate>returns remainder of v1/v2 which is v1 - iV2 for some integer i</translate>''<br/><!-- GIDEROSMTD:math.fmod -->
[[Special:MyLanguage/math.frexp|math.frexp]] ''<translate>returns mantissa [0.5,1- and exponent values of v</translate>''<br/>
+
[[Special:MyLanguage/math.frexp|math.frexp]] ''<translate>returns mantissa [0.5,1- and exponent values of v</translate>''<br/><!-- GIDEROSMTD:math.frexp -->
[[Special:MyLanguage/math.ldexp|math.ldexp]] ''<translate>returns v1*2^v2</translate>''<br/>
+
[[Special:MyLanguage/math.ldexp|math.ldexp]] ''<translate>returns v1*2^v2</translate>''<br/><!-- GIDEROSMTD:math.ldexp -->
[[Special:MyLanguage/math.log|math.log]] ''<translate>returns natural logarithm of v</translate>''<br/>
+
[[Special:MyLanguage/math.log|math.log]] ''<translate>returns natural logarithm of v</translate>''<br/><!-- GIDEROSMTD:math.log -->
[[Special:MyLanguage/math.log10|math.log10]] ''<translate>returns logarithm 10 of v</translate>''<br/>
+
[[Special:MyLanguage/math.log10|math.log10]] ''<translate>returns logarithm 10 of v</translate>''<br/><!-- GIDEROSMTD:math.log10 -->
[[Special:MyLanguage/math.max|math.max]] ''<translate>returns maximum in a list of one or more values</translate>''<br/>
+
[[Special:MyLanguage/math.max|math.max]] ''<translate>returns maximum in a list of one or more values</translate>''<br/><!-- GIDEROSMTD:math.max -->
[[Special:MyLanguage/math.min|math.min]] ''<translate>returns minimum in a list of one or more values</translate>''<br/>
+
[[Special:MyLanguage/math.min|math.min]] ''<translate>returns minimum in a list of one or more values</translate>''<br/><!-- GIDEROSMTD:math.min -->
[[Special:MyLanguage/math.pow|math.pow]] ''<translate>returns v1 raised to the power of v2</translate>''<br/>
+
[[Special:MyLanguage/math.pow|math.pow]] ''<translate>returns v1 raised to the power of v2</translate>''<br/><!-- GIDEROSMTD:math.pow -->
[[Special:MyLanguage/math.rad|math.rad]] ''<translate>returns angle in radians of degrees deg</translate>''<br/>
+
[[Special:MyLanguage/math.rad|math.rad]] ''<translate>returns angle in radians of degrees deg</translate>''<br/><!-- GIDEROSMTD:math.rad -->
[[Special:MyLanguage/math.random|math.random]] ''<translate>returns random real [0,1-, integer [1,n] or real [1,u](with n=1-</translate>''<br/>
+
[[Special:MyLanguage/math.random|math.random]] ''<translate>returns random real [0,1-, integer [1,n] or real [1,u](with n=1-</translate>''<br/><!-- GIDEROSMTD:math.random -->
[[Special:MyLanguage/math.randomseed|math.randomseed]] ''<translate>sets seed for pseudo-random number generator</translate>''<br/>
+
[[Special:MyLanguage/math.randomseed|math.randomseed]] ''<translate>sets seed for pseudo-random number generator</translate>''<br/><!-- GIDEROSMTD:math.randomseed -->
[[Special:MyLanguage/math.sin|math.sin]] ''<translate>returns sine value of angle rad</translate>''<br/>
+
[[Special:MyLanguage/math.sin|math.sin]] ''<translate>returns sine value of angle rad</translate>''<br/><!-- GIDEROSMTD:math.sin -->
[[Special:MyLanguage/math.sqrt|math.sqrt]] ''<translate>returns square root of v</translate>''<br/>
+
[[Special:MyLanguage/math.sqrt|math.sqrt]] ''<translate>returns square root of v</translate>''<br/><!-- GIDEROSMTD:math.sqrt -->
[[Special:MyLanguage/math.tan|math.tan]] ''<translate>returns tangent value of angle rad</translate>''<br/>
+
[[Special:MyLanguage/math.tan|math.tan]] ''<translate>returns tangent value of angle rad</translate>''<br/><!-- GIDEROSMTD:math.tan -->
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Events</translate> ===
 
=== <translate>Events</translate> ===
 
=== <translate>Constants</translate> ===
 
=== <translate>Constants</translate> ===
[[Special:MyLanguage/huge|huge]]<br/>
+
[[Special:MyLanguage/huge|huge]]<br/><!-- GIDEROSCST:huge -->
[[Special:MyLanguage/pi|pi]]<br/>
+
[[Special:MyLanguage/pi|pi]]<br/><!-- GIDEROSCST:pi -->
 
|}
 
|}

Revision as of 14:56, 31 August 2018

Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.png
Available since: Gideros 2011.6

Description

math table holds most commonly used math functions and constants

Methods

math.abs returns absolute value of v
math.acos returns arc cosine value of v in radians
math.asin returns arc sine value of v in radians
math.atan returns arc tangent value of v in radians
math.atan2 returns arc tangent value of v1/v2 in radians
math.ceil returns smallest integer >= v
math.cos returns cosine value of angle rad
math.deg returns angle in degrees of radians rad
math.exp returns e^v
math.floor returns largest integer <= v
math.fmod returns remainder of v1/v2 which is v1 - iV2 for some integer i
math.frexp returns mantissa [0.5,1- and exponent values of v
math.ldexp returns v1*2^v2
math.log returns natural logarithm of v
math.log10 returns logarithm 10 of v
math.max returns maximum in a list of one or more values
math.min returns minimum in a list of one or more values
math.pow returns v1 raised to the power of v2
math.rad returns angle in radians of degrees deg
math.random returns random real [0,1-, integer [1,n] or real [1,u](with n=1-
math.randomseed sets seed for pseudo-random number generator
math.sin returns sine value of angle rad
math.sqrt returns square root of v
math.tan returns tangent value of angle rad

Events

Constants

huge
pi