Difference between revisions of "Math"

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

Revision as of 14:19, 23 August 2018

Supported platforms: android, ios, mac, pc
Available since: Gideros 2011.6

Description

math table holds most commonly used math functions and constants

Methods

math.abs Template:Returns absolute value of v
math.acos Template:Returns arc cosine value of v in radians
math.asin Template:Returns arc sine value of v in radians
math.atan Template:Returns arc tangent value of v in radians
math.atan2 Template:Returns arc tangent value of v1/v2 in radians
math.ceil {{returns smallest integer >= v}}
math.cos Template:Returns cosine value of angle rad
math.deg Template:Returns angle in degrees of radians rad
math.exp Template:Returns e^v
math.floor {{returns largest integer <= v}}
math.fmod Template: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 Template:Returns v1*2^v2
math.log Template:Returns natural logarithm of v
math.log10 Template:Returns logarithm 10 of v
math.max Template:Returns maximum in a list of one or more values
math.min Template:Returns minimum in a list of one or more values
math.pow Template:Returns v1 raised to the power of v2
math.rad Template: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 Template:Sets seed for pseudo-random number generator
math.sin Template:Returns sine value of angle rad
math.sqrt Template:Returns square root of v
math.tan Template:Returns tangent value of angle rad

Events

Constants

huge
pi