IO is an event based input manager which permit to select which composents are manged on your system
Dependencies: C12832 FXOS8700Q LM75B MMA7660
Vector.cpp
- Committer:
- co838_app56
- Date:
- 2016-02-25
- Revision:
- 4:50e2aefe516b
- Parent:
- 3:1ab88130bb9d
File content as of revision 4:50e2aefe516b:
#include "Vector.h" #include <float.h> Vector::Vector(void) : x(0), y(0), z(0) {} Vector::Vector(float X, float Y, float Z) : x(X), y(Y), z(Z) {} Vector::Vector(const Vector ©) { *this = copy; } Vector &Vector::operator=(const Vector ©) { x = copy.x; y = copy.y; z = copy.z; return (*this); } bool Vector::operator!=(const Vector &other) const { return (!(*this == other)); } bool Vector::operator==(const Vector &other) const { return (other.x - x < FLT_MIN && other.y - y < FLT_MIN && other.z - z < FLT_MIN); } bool Vector::eq(const Vector &other, float prec) const { return (other.x - x < prec && other.y - y < prec && other.z - z < prec); }