-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAcceleration.java
50 lines (44 loc) · 1.22 KB
/
Acceleration.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package com.example.houmanazemati.myapplication;
/**
* Created by houman.azemati on 2/23/18.
*/
public class Acceleration {
private float x,y,z;
/*
* Construction
* @param init_x The initial acceleration in the x direction
* @param init_y The initial acceleration in the y direction
* @param init_z The initial acceleration in the z direction
*/
public Acceleration(float init_x, float init_y, float init_z) {
x = init_x;
y = init_y;
z = init_z;
}
/*
* setAcceleration
* @param pos_x The acceleration in the x direction
* @param pos_y The acceleration in the y direction
* @param pos_z The acceleration in the z direction
*/
public void setAcceleration(float pos_x, float pos_y, float pos_z) {
x = pos_x;
y = pos_y;
z = pos_z;
}
/*
* get the
* @param pos_x The acceleration in the x direction
* @param pos_y The acceleration in the y direction
* @param pos_z The acceleration in the z direction
*/
public float getAccelerationX() {
return x;
}
public float getAccelerationY() {
return y;
}
public float getAccelerationZ() {
return z;
}
}