Difference between revisions of "Accelerometer:getAcceleration"

From GiderosMobile
m (Text replacement - "</source" to "</syntaxhighlight")
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
 
 
'''Available since:''' Gideros 2012.8<br/>
 
'''Available since:''' Gideros 2012.8<br/>
 +
'''Class:''' [[Accelerometer]]<br/>
 +
 
=== Description ===
 
=== Description ===
<br />
+
Returns the 3-axis acceleration measured by the accelerometer.
Returns the 3-axis acceleration measured by the accelerometer.<br />
+
 
<br />
+
<syntaxhighlight lang="lua">
<source lang="lua">
 
 
(number), (number), (number) = Accelerometer:getAcceleration()
 
(number), (number), (number) = Accelerometer:getAcceleration()
</source>
+
</syntaxhighlight>
 +
 
 
=== Return values ===
 
=== Return values ===
 
'''Returns''' (number) acceleration on x-axis in G's<br/>
 
'''Returns''' (number) acceleration on x-axis in G's<br/>
 
'''Returns''' (number) acceleration on y-axis in G's<br/>
 
'''Returns''' (number) acceleration on y-axis in G's<br/>
 
'''Returns''' (number) acceleration on z-axis in G's<br/>
 
'''Returns''' (number) acceleration on z-axis in G's<br/>
 +
 +
{{Accelerometer}}

Latest revision as of 17:22, 12 July 2023

Available since: Gideros 2012.8
Class: Accelerometer

Description

Returns the 3-axis acceleration measured by the accelerometer.

(number), (number), (number) = Accelerometer:getAcceleration()

Return values

Returns (number) acceleration on x-axis in G's
Returns (number) acceleration on y-axis in G's
Returns (number) acceleration on z-axis in G's