DGtal  0.9.3
DGtal::AngleComputer Struct Reference

#include <DGtal/math/AngleComputer.h>

## Static Public Member Functions

static float cast (float i)

static bool less (float i, float j)

static float posDiff (float j, float i)

static float deviation (float j, float i)

static float min (float i, float j)

static float max (float i, float j)

static double cast (double i)

static bool less (double i, double j)

static double posDiff (double j, double i)

static double deviation (double j, double i)

static double min (double i, double j)

static double max (double i, double j)

## Detailed Description

A simple class to perform angle computations. All angles are in [0:2pi[

Definition at line 58 of file AngleComputer.h.

## ◆ cast() [1/2]

 static float DGtal::AngleComputer::cast ( float i )
static
Parameters
 i any angle.
Returns
the corresponding angle in [0:2pi[

## ◆ cast() [2/2]

 static double DGtal::AngleComputer::cast ( double i )
static
Parameters
 i any angle.
Returns
the corresponding angle in [0:2pi[

## ◆ deviation() [1/2]

 static float DGtal::AngleComputer::deviation ( float j, float i )
static

Performs j - i, assuming th result is in [-pi:pi[

Parameters
 j any angle in [0:2pi[ i any angle in [0:2pi[
Returns
the value j - i, always positive.

## ◆ deviation() [2/2]

 static double DGtal::AngleComputer::deviation ( double j, double i )
static

Performs j - i, assuming th result is in [-pi:pi[

Parameters
 j any angle in [0:2pi[ i any angle in [0:2pi[
Returns
the value j - i, always positive.

## ◆ less() [1/2]

 static bool DGtal::AngleComputer::less ( float i, float j )
static

Less comparator modulo. Be careful, modulo comparisons have no sense when the absolute difference of the values are around pi.

Parameters
 i any angle in [0:2pi[ j any angle in [0:2pi[
Returns
'true' if [i] strictly precedes [j] in a window 'pi'.

## ◆ less() [2/2]

 static bool DGtal::AngleComputer::less ( double i, double j )
static

Less comparator modulo. Be careful, modulo comparisons have no sense when the absolute difference of the values are around pi.

Parameters
 i any angle in [0:2pi[ j any angle in [0:2pi[
Returns
'true' if [i] strictly precedes [j] in a window 'pi'.

## ◆ max() [1/2]

 static float DGtal::AngleComputer::max ( float i, float j )
static

Equivalent to 'less( i, j ) ? j : i'.

Parameters
 i any angle in [0:2pi[ j any angle in [0:2pi[
Returns
the greatest angle of [i] and [j] in a window 'pi'.

## ◆ max() [2/2]

 static double DGtal::AngleComputer::max ( double i, double j )
static

Equivalent to 'less( i, j ) ? j : i'.

Parameters
 i any angle in [0:2pi[ j any angle in [0:2pi[
Returns
the greatest angle of [i] and [j] in a window 'pi'.

## ◆ min() [1/2]

 static float DGtal::AngleComputer::min ( float i, float j )
static

Equivalent to 'less( i, j ) ? i : j'.

Parameters
 i any angle in [0:2pi[ j any angle in [0:2pi[
Returns
the smallest angle of [i] and [j] in a window 'pi'.

## ◆ min() [2/2]

 static double DGtal::AngleComputer::min ( double i, double j )
static

Equivalent to 'less( i, j ) ? i : j'.

Parameters
 i any angle in [0:2pi[ j any angle in [0:2pi[
Returns
the smallest angle of [i] and [j] in a window 'pi'.

## ◆ posDiff() [1/2]

 static float DGtal::AngleComputer::posDiff ( float j, float i )
static

Performs j - i modulo 2pi, assuming less(i,j) is true.

Parameters
 j any angle in [0:2pi[ i any angle in [0:2pi[
Returns
the value j - i, always positive.

## ◆ posDiff() [2/2]

 static double DGtal::AngleComputer::posDiff ( double j, double i )
static

Performs j - i modulo 2pi, assuming less(i,j) is true.

Parameters
 j any angle in [0:2pi[ i any angle in [0:2pi[
Returns
the value j - i, always positive.

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