java.lang.Object
com.gluonhq.attach.accelerometer.Acceleration
Represents a reading taken from the
AccelerometerService
.
By using a device's accelerometer the acceleration force in three physical axes can be determined.- Since:
- 3.0.0
- See Also:
-
Constructor Summary
ConstructorDescriptionAcceleration
(double x, double y, double z, LocalDateTime timestamp) Creates a new immutable Acceleration instance with the given x, y, z, and timestamp values. -
Method Summary
-
Constructor Details
-
Acceleration
Creates a new immutable Acceleration instance with the given x, y, z, and timestamp values.- Parameters:
x
- The x value of the readingy
- The y value of the readingz
- The z value of the readingtimestamp
- The instant at which the reading took place
-
-
Method Details
-
getX
public double getX()Returns the x value of the reading.- Returns:
- The x value of the reading.
-
getY
public double getY()Returns the y value of the reading- Returns:
- The y value of the reading.
-
getZ
public double getZ()Returns the z value of the reading- Returns:
- The z value of the reading.
-
getTimestamp
Returns the timestamp of the reading- Returns:
- The timestamp of the reading.
-