Control Surface
main
MIDI Control Surface library for Arduino
Toggle main menu visibility
Loading...
Searching...
No Matches
src
AH
Math
Vector.cpp
Go to the documentation of this file.
1
#include "
Vector.hpp
"
2
3
#include <
AH/PrintStream/PrintStream.hpp
>
4
#ifndef ARDUINO
5
#include <ostream>
// std::ostream, <<
6
#endif
7
8
BEGIN_AH_NAMESPACE
9
10
// LCOV_EXCL_START
11
12
#ifndef ARDUINO
13
16
std::ostream &
operator<<
(std::ostream &os,
Vec2f
v) {
17
return
os <<
"("
<< v.
x
<<
", "
<< v.
y
<<
")"
;
18
}
19
22
std::ostream &
operator<<
(std::ostream &os,
Vec3f
v) {
23
return
os <<
"("
<< v.
x
<<
", "
<< v.
y
<<
", "
<< v.
z
<<
")"
;
24
}
25
26
#endif
27
30
Print &
operator<<
(Print &os,
Vec2f
v) {
31
return
os <<
"("
<< v.
x
<<
", "
<< v.
y
<<
")"
;
32
}
33
36
Print &
operator<<
(Print &os,
Vec3f
v) {
37
return
os <<
"("
<< v.
x
<<
", "
<< v.
y
<<
", "
<< v.
z
<<
")"
;
38
}
39
40
// LCOV_EXCL_STOP
41
42
END_AH_NAMESPACE
END_AH_NAMESPACE
#define END_AH_NAMESPACE
Definition
AH/Settings/NamespaceSettings.hpp:14
BEGIN_AH_NAMESPACE
#define BEGIN_AH_NAMESPACE
Definition
AH/Settings/NamespaceSettings.hpp:11
PrintStream.hpp
Vector.hpp
Definition of Vec2f and Vec3f.
AH::operator<<
std::enable_if_t< std::is_arithmetic< T >::value, Print & > operator<<(Print &os, const AH::ArraySlice< T, N, Reverse, Const > &a)
Definition
ArrayHelpers.hpp:275
::Vec2f
Type for 2D vectors of floating point numbers.
Definition
Vector.hpp:39
AH::Vec2f::y
float y
The y component of the vector.
Definition
Vector.hpp:41
AH::Vec2f::operator<<
Print & operator<<(Print &os, Vec2f v)
Printing.
Definition
Vector.cpp:30
AH::Vec2f::x
float x
The x component of the vector.
Definition
Vector.hpp:40
AH::Vec2f::Vec2f
Vec2f()=default
Create a vector that is initialized to the zero vector (0,0).
::Vec3f
Type for 3D vectors of floating point numbers.
Definition
Vector.hpp:140
AH::Vec3f::operator<<
Print & operator<<(Print &os, Vec3f v)
Printing.
Definition
Vector.cpp:36
AH::Vec3f::y
float y
The y component of the vector.
Definition
Vector.hpp:142
AH::Vec3f::Vec3f
Vec3f()=default
Create a vector that is initialized to the zero vector (0,0,0).
AH::Vec3f::x
float x
The x component of the vector.
Definition
Vector.hpp:141
AH::Vec3f::z
float z
The z component of the vector.
Definition
Vector.hpp:143
Generated by
1.17.0