Difference between revisions of "Trigonometry Conversion Operators"

From GiderosMobile
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''<translate>Supported platforms</translate>:''' [[File:Platform android]][[File:Platform ios]][[File:Platform mac]][[File:Platform pc]]<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 2017.10<br/>
 
'''<translate>Available since</translate>:''' Gideros 2017.10<br/>
 
=== <translate>Description</translate> ===
 
=== <translate>Description</translate> ===

Revision as of 10:36, 24 August 2018

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