| glVertex
    5.5.2
    | 
2D double vector More...
#include <glslmath.h>
| Public Member Functions | |
| vec2 () | |
| default constructor | |
| vec2 (const vec2 &v) | |
| copy constructor | |
| vec2 (const double vx, const double vy) | |
| component-wise constructor | |
| vec2 (const double v) | |
| single-component constructor | |
| const double * | c_ptr () const | 
| const pointer to linear array | |
| operator const double * () const | |
| cast operator to linear array | |
| double | length () const | 
| get vector length | |
| double | norm () const | 
| get squared vector length | |
| vec2 | normalize () const | 
| normalize vector to unit length  More... | |
| double | dot (const vec2 &v) const | 
| inner product | |
| bool | approx (const vec2 &v, const double e=1E-10) const | 
| test for approximate equality | |
| vec2 & | operator+= (const vec2 &v) | 
| inplace addition | |
| vec2 & | operator-= (const vec2 &v) | 
| inplace subtraction | |
| vec2 & | operator*= (double v) | 
| inplace multiplication | |
| vec2 & | operator*= (const vec2 &v) | 
| inplace multiplication | |
| vec2 | yx () const | 
| swizzeling operator | |
| operator std::string () | |
| string cast operator | |
| std::string | to_string (std::string delimiter=", ", int space=0) | 
| conversion to string | |
| Public Attributes | |
| union { | |
| }; | |
| vector components | |
2D double vector
| 
 | inline | 
normalize vector to unit length
normalization to unit length
 1.8.17
 1.8.17