Difference between revisions of "Trigonometry Conversion Operators"

From GiderosMobile
Line 2: Line 2:
 
'''Supported platforms:''' android, ios, mac, pc<br/>
 
'''Supported platforms:''' android, ios, mac, pc<br/>
 
'''Available since:''' Gideros 2017.10<br/>
 
'''Available since:''' Gideros 2017.10<br/>
=== Description ===
+
=== <translate>Description</translate> ===
 
<translate><br />
 
<translate><br />
 
Operators to convert from one type of measurement to another.<br /><br />
 
Operators to convert from one type of measurement to another.<br /><br />
Line 8: Line 8:
 
<b> ^&lt; </b>deg &emsp; Convert 'deg' into radians.<br />
 
<b> ^&lt; </b>deg &emsp; Convert 'deg' into radians.<br />
 
<b> ^&gt; </b>rad &emsp; Convert 'rad' into degrees.<br /></translate>
 
<b> ^&gt; </b>rad &emsp; Convert 'rad' into degrees.<br /></translate>
=== Examples ===
+
=== <translate>Examples</translate> ===
 
'''Simple ^< examples'''<br/>
 
'''Simple ^< examples'''<br/>
 
<source lang="lua">  
 
<source lang="lua">  
Line 20: Line 20:
 
{|-
 
{|-
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
=== Methods ===
+
=== <translate>Methods</translate> ===
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
=== Events ===
+
=== <translate>Events</translate> ===
=== Constants ===
+
=== <translate>Constants</translate> ===
 
|}
 
|}

Revision as of 08:28, 24 August 2018

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

Description


Operators to convert from one type of measurement to another.

^< deg   Convert 'deg' into radians.
^> rad   Convert 'rad' into degrees.

Examples

Simple ^< examples

 
r=^&lt;d -- faster than r=math.rad(d)
radAngle=^&lt;sprite:getRotation()
pi=^&lt;180 -- pi is 3.142 in radians or 180 in degrees

Simple ^> examples

 
d=^&gt;r -- faster than d=math.deg(r)
sprite:setRotation(^&gt;math.sin(0.5))

Methods

Events

Constants