ese 519 include files
Dependents: PROJECT_3D_AUDIO COG4050_adxl355_tilt COG4050_adxl355_tilt COG4050_adxl355_tilt_4050
velocity.h@0:5347612e39a3, 2015-04-07 (annotated)
- Committer:
- niv17
- Date:
- Tue Apr 07 21:09:51 2015 +0000
- Revision:
- 0:5347612e39a3
april_7 _ sonic start
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
niv17 | 0:5347612e39a3 | 1 | #ifndef VELOCITY_H |
niv17 | 0:5347612e39a3 | 2 | #define VELOCITY_H |
niv17 | 0:5347612e39a3 | 3 | |
niv17 | 0:5347612e39a3 | 4 | #pragma once |
niv17 | 0:5347612e39a3 | 5 | |
niv17 | 0:5347612e39a3 | 6 | #include <stdexcept> |
niv17 | 0:5347612e39a3 | 7 | |
niv17 | 0:5347612e39a3 | 8 | using namespace std; |
niv17 | 0:5347612e39a3 | 9 | |
niv17 | 0:5347612e39a3 | 10 | class Velocity { |
niv17 | 0:5347612e39a3 | 11 | float dx; |
niv17 | 0:5347612e39a3 | 12 | float dy; |
niv17 | 0:5347612e39a3 | 13 | float dz; |
niv17 | 0:5347612e39a3 | 14 | public: |
niv17 | 0:5347612e39a3 | 15 | Velocity () : dx(0), dy(0), dz(0) {} |
niv17 | 0:5347612e39a3 | 16 | Velocity (float dx0, float dy0, float dz0) : dx(dx0), dy(dy0), dz(dz0) {} |
niv17 | 0:5347612e39a3 | 17 | Velocity& operator= (const Velocity&); |
niv17 | 0:5347612e39a3 | 18 | Velocity& operator+=(const Velocity&); |
niv17 | 0:5347612e39a3 | 19 | bool operator< (const Velocity&) const; |
niv17 | 0:5347612e39a3 | 20 | float getdX (void) const; |
niv17 | 0:5347612e39a3 | 21 | float getdY (void) const; |
niv17 | 0:5347612e39a3 | 22 | float getdZ (void) const; |
niv17 | 0:5347612e39a3 | 23 | }; |
niv17 | 0:5347612e39a3 | 24 | #endif |