simplevectors
0.3.9
Simple vector implementations in C++
|
For adding vectors to an embedded device, there is a file called embed.hpp
, located in include/simplevectors
, which contains a minimized version of the 2D and 3D vector objects above, named Vec2D
and Vec3D
, respectively. They include every feature mentioned except for looping and extending.
Differences from Vector2D
and Vector3D
:
Vec2D
and Vec3D
instead of Vector2D
and Vector3D
..x
, .y
, and .z
instead of .x()
, .y()
, and .z()
to access x, y, and z values..dot()
, .cross()
, etc), so you must use the functional equivalents (e.g. dot(vec)
, cross(vec)
) mentioned above. Most functions are compatible between the embed and non-embed versions, with some exceptions that are stated below.makeVector()
does not exist for the embedded version.simplevectors/vectors.hpp
because it is meant to be a standalone file, so it must be included explicitly.For embedded devices without access to the C++ standard library, such as on an Arduino, there is another file named embed.h
. It is mostly the same as embed.hpp
, with a few exceptions:
EmbVec2D
rather than Vec2D
.EmbVec3D
rather than Vec3D
.std
namespace, but the svector
namespace is still there.toString()
function.