NDEVR
API Documentation
misc.h

some general case utility functions More...

#include "Base/Headers/Angle.h"
#include "macros.h"
#include <cmath>
Include dependency graph for misc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ForceLinker
 Helper struct that forces linkage with a static library by calling a function at construction time. More...

Namespaces

namespace  NDEVR
 The primary namespace for the NDEVR SDK.

Typedefs

typedef void(* ForceLinkFunction) (void)
 The following two functions are used to force linkage with static libraries.

Functions

bool arrayHasInvalid (const g_type *array, int size, int *nanIndex=0)
 tests whether there is a Invalid in the array
g_type average_angle (g_type theta1, g_type theta2)
 average two angles
template<typename T>
clamp (T l, T x, T u)
 clamp x to the interval [l, u]
g_type deg2rad (g_type degree)
 convert from degree to radian
template<typename T>
hypot (T x, T y)
 return the hypot of x and y
template<typename T>
hypot_sqr (T x, T y)
 return the squared hypot of x and y
g_type rad2deg (g_type rad)
 convert from radian to degree
template<typename T>
int sign (T x)
 sign function.
template<typename T>
square (T x)
 return the square value
template<typename T>
wrap (T l, T x, T u)
 wrap x to be in the interval [l, u]

Detailed Description

some general case utility functions

This file specifies some general case utility functions

Definition in file misc.h.