Control Surface stm32
MIDI Control Surface library for Arduino
Vector.cpp
Go to the documentation of this file.
1#include "Vector.hpp"
2
3AH_DIAGNOSTIC_WERROR() // Enable errors on warnings
4
5#include <AH/PrintStream/PrintStream.hpp>
6#ifndef ARDUINO
7#include <ostream> // std::ostream, <<
8#endif
9
11
12// LCOV_EXCL_START
13
14#ifndef ARDUINO
15
18std::ostream &operator<<(std::ostream &os, Vec2f v) {
19 return os << "(" << v.x << ", " << v.y << ")";
20}
21
24std::ostream &operator<<(std::ostream &os, Vec3f v) {
25 return os << "(" << v.x << ", " << v.y << ", " << v.z << ")";
26}
27
28#endif
29
32Print &operator<<(Print &os, Vec2f v) {
33 return os << "(" << v.x << ", " << v.y << ")";
34}
35
38Print &operator<<(Print &os, Vec3f v) {
39 return os << "(" << v.x << ", " << v.y << ", " << v.z << ")";
40}
41
42// LCOV_EXCL_STOP
43
45
#define END_AH_NAMESPACE
#define BEGIN_AH_NAMESPACE
Definition of Vec2f and Vec3f.
#define AH_DIAGNOSTIC_POP()
Definition: Warnings.hpp:37
#define AH_DIAGNOSTIC_WERROR()
Definition: Warnings.hpp:36
Print & operator<<(Print &os, Quaternion e)
Printing.
Definition: Quaternion.cpp:28
Type for 2D vectors of floating point numbers.
Definition: Vector.hpp:42
float y
The y component of the vector.
Definition: Vector.hpp:44
Print & operator<<(Print &os, Vec2f v)
Printing.
Definition: Vector.cpp:32
float x
The x component of the vector.
Definition: Vector.hpp:43
Type for 3D vectors of floating point numbers.
Definition: Vector.hpp:143
Print & operator<<(Print &os, Vec3f v)
Printing.
Definition: Vector.cpp:38
float y
The y component of the vector.
Definition: Vector.hpp:145
float x
The x component of the vector.
Definition: Vector.hpp:144
float z
The z component of the vector.
Definition: Vector.hpp:146