Openholo
v5.0
Open Source Digital Holographic Library
|
structure for 2-dimensional Real type vector and its arithmetic. More...
#include <vec.h>
Public Member Functions | |
vec2 () | |
vec2 (Real a) | |
vec2 (Real v_1, Real v_2) | |
vec2 (const ivec2 &a) | |
vec2 (const vec2 &a) | |
vec2 & | operator= (const vec2 &a) |
Real & | operator[] (int i) |
const Real & | operator[] (int i) const |
Real & | operator() (int i) |
const Real & | operator() (int i) const |
bool | unit () |
Real | length () const |
bool | is_zero () const |
bool | is_tiny (Real tiny_tol=epsilon) const |
int | is_parallel (const vec2 &, Real=angle_tolerance) const |
bool | is_perpendicular (const vec2 &, Real=angle_tolerance) const |
bool | perpendicular (const vec2 &) |
bool | perpendicular (const vec2 &, const vec2 &) |
Public Attributes | |
Real | v [2] |
Static Public Attributes | |
static const int | n = 2 |
structure for 2-dimensional Real type vector and its arithmetic.
int oph::vec2::is_parallel | ( | const vec2 & | vv, |
Real | angle_tolerance = angle_tolerance |
||
) | const |
bool oph::vec2::is_perpendicular | ( | const vec2 & | vv, |
Real | angle_tolerance = angle_tolerance |
||
) | const |