Arduino Helpers master
Utility library for Arduino
Vector.cpp
Go to the documentation of this file.
1#include "Vector.hpp"
2
4#ifndef ARDUINO
5#include <ostream> // std::ostream, <<
6#endif
7
9
10// LCOV_EXCL_START
11
12#ifndef ARDUINO
13
16std::ostream &operator<<(std::ostream &os, Vec2f v) {
17 return os << "(" << v.x << ", " << v.y << ")";
18}
19
22std::ostream &operator<<(std::ostream &os, Vec3f v) {
23 return os << "(" << v.x << ", " << v.y << ", " << v.z << ")";
24}
25
26#endif
27
30Print &operator<<(Print &os, Vec2f v) {
31 return os << "(" << v.x << ", " << v.y << ")";
32}
33
36Print &operator<<(Print &os, Vec3f v) {
37 return os << "(" << v.x << ", " << v.y << ", " << v.z << ")";
38}
39
40// LCOV_EXCL_STOP
41
#define END_AH_NAMESPACE
#define BEGIN_AH_NAMESPACE
Definition of Vec2f and Vec3f.
Print & operator<<(Print &os, Vec3f v)
Printing.
Definition: Vector.cpp:36
Print & operator<<(Print &os, Vec2f v)
Printing.
Definition: Vector.cpp:30
Print & operator<<(Print &os, Quaternion e)
Printing.
Definition: Quaternion.cpp:26
Type for 2D vectors of floating point numbers.
Definition: Vector.hpp:39
float y
The y component of the vector.
Definition: Vector.hpp:41
float x
The x component of the vector.
Definition: Vector.hpp:40
Type for 3D vectors of floating point numbers.
Definition: Vector.hpp:140
float y
The y component of the vector.
Definition: Vector.hpp:142
float x
The x component of the vector.
Definition: Vector.hpp:141
float z
The z component of the vector.
Definition: Vector.hpp:143