HMC5883L  0.2
Library for I2C communication with HMC5883L over Arduino
 All Classes Files Functions Variables Modules
Vec3< T > Struct Template Reference

Public Member Functions

 Vec3 (T X, T Y, T Z)
 
Vec3< T > operator+ (Vec3< T > v)
 
Vec3< T > operator- (Vec3< T > v)
 
Vec3< T > operator* (Vec3< T > v)
 
Vec3< T > operator/ (Vec3< T > v)
 
Vec3< T > operator+ (int c)
 
Vec3< T > operator- (int c)
 
Vec3< T > operator* (int c)
 
Vec3< T > operator/ (int c)
 
Vec3< T > operator+ (double c)
 
Vec3< T > operator- (double c)
 
Vec3< T > operator* (double c)
 
Vec3< T > operator/ (double c)
 

Public Attributes

x
 Class for holding Cartesian 3-vectors. More...
 
y
 
z
 

Member Data Documentation

template<typename T>
T Vec3< T >::x

Class for holding Cartesian 3-vectors.

This is a class for holding Cartesian 3-vectors of values with type T (assumed to be numeric types). Addition, subtraction, division and multiplication are defined such that vector arithmetic is element-wise (e.g. [1, 2, 3] * [2, 4, 7] == [2, 8, 21]), and scalar operations are applied to all elements (e.g. [1, 2, 3] + 4 == [5, 6, 7]).


The documentation for this struct was generated from the following file: