OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vec2d.h File Reference

2D floating point vector functions. More...

+ Include dependency graph for vec2d.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define X_INDEX   0
 
#define Y_INDEX   1
 
#define Vec2d(variable_name)   double variable_name[2]
 
#define Vec2dArray(variable_name, size)   double variable_name[size][2]
 

Functions

EXTENSION_INLINE double _v2dMag (const Vec2d(v))
 

Detailed Description

2D floating point vector functions.

Definition in file vec2d.h.

Macro Definition Documentation

#define Vec2d (   variable_name)    double variable_name[2]

Definition at line 28 of file vec2d.h.

Referenced by _faceIjkToGeo(), and _geoToFaceIjk().

#define Vec2dArray (   variable_name,
  size 
)    double variable_name[size][2]

Definition at line 29 of file vec2d.h.

#define X_INDEX   0
#define Y_INDEX   1

Function Documentation

EXTENSION_INLINE double _v2dMag ( const   Vec2dv)

Calculates the magnitude of a 2D cartesian vector.

Parameters
vThe 2D cartesian vector.
Returns
The magnitude of the vector.

Definition at line 30 of file vec2d.hpp.

References X_INDEX, and Y_INDEX.

Referenced by _hex2dToGeo().

30  {
31  return sqrt(v[X_INDEX] * v[X_INDEX] + v[Y_INDEX] * v[Y_INDEX]);
32 }
#define X_INDEX
Definition: vec2d.h:26
#define Y_INDEX
Definition: vec2d.h:27

+ Here is the caller graph for this function: