vigra - Functions for FixedPoint16

[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

| Functions for FixedPoint16 |

#include <vigra/fixedpoint.hxx>
More...

## Functions
template<int IntBits, FPOverflowHandling OverflowHandling>
FixedPoint16< IntBits, OverflowHandling > | abs (FixedPoint16< IntBits, OverflowHandling > v)
| absolute value.
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2, int IntBits3>
FixedPoint16< IntBits3, OverflowHandling > & | add (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r, FixedPoint16< IntBits3, OverflowHandling > &result)
| addition with enforced result type.
template<int IntBits, FPOverflowHandling OverflowHandling>
FixedPoint16< 2, OverflowHandling > | atan2 (FixedPoint16< IntBits, OverflowHandling > y, FixedPoint16< IntBits, OverflowHandling > x)
| Arctangent. Accuracy better than 1/3 degree (9 significant bits).
template<int IntBits, FPOverflowHandling OverflowHandling>
Int32 | ceil (FixedPoint16< IntBits, OverflowHandling > v)
| rounding up.
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2, int IntBits3>
FixedPoint16< IntBits3, OverflowHandling > & | div (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r, FixedPoint16< IntBits3, OverflowHandling > &result)
| division with enforced result type.
template<int IntBits, FPOverflowHandling OverflowHandling>
FixedPoint16< IntBits, OverflowHandling > | dual_frac (FixedPoint16< IntBits, OverflowHandling > v)
| dual fractional part. (1 - frac(v))
template<class TARGET , int IntBits, FPOverflowHandling OverflowHandling>
TARGET | fixed_point_cast (FixedPoint16< IntBits, OverflowHandling > v)
template<int IntBits, FPOverflowHandling OverflowHandling>
Int32 | floor (FixedPoint16< IntBits, OverflowHandling > v)
| rounding down.
template<int IntBits, FPOverflowHandling OverflowHandling>
FixedPoint16< IntBits, OverflowHandling > | frac (FixedPoint16< IntBits, OverflowHandling > v)
| fractional part. (difference between v and its floor)
template<int IntBits, FPOverflowHandling OverflowHandling>
FixedPoint16< IntBits, OverflowHandling > | hypot (FixedPoint16< IntBits, OverflowHandling > v1, FixedPoint16< IntBits, OverflowHandling > v2)
| Length of hypotenuse.
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2, int IntBits3>
FixedPoint16< IntBits3, OverflowHandling > & | mul (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r, FixedPoint16< IntBits3, OverflowHandling > &result)
| multiplication with enforced result type.
template<int IntBits, FPOverflowHandling OverflowHandling>
NormTraits< FixedPoint16 < IntBits, OverflowHandling > >::NormType | norm (FixedPoint16< IntBits, OverflowHandling > const &v)
| norm (same as abs).
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2>
bool | operator!= (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r)
| not equal
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2>
PromoteTraits< FixedPoint16 < IntBits1, OverflowHandling > , FixedPoint16< IntBits2, OverflowHandling > >::Promote | operator* (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r)
| multiplication with automatic determination of the appropriate result type.
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2>
PromoteTraits< FixedPoint16 < IntBits1, OverflowHandling > , FixedPoint16< IntBits2, OverflowHandling > >::Promote | operator+ (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r)
| addition with automatic determination of the appropriate result type.
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2>
PromoteTraits< FixedPoint16 < IntBits1, OverflowHandling > , FixedPoint16< IntBits2, OverflowHandling > >::Promote | operator- (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r)
| subtraction with automatic determination of the appropriate result type.
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2>
PromoteTraits< FixedPoint16 < IntBits1, OverflowHandling > , FixedPoint16< IntBits2, OverflowHandling > >::Promote | operator/ (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r)
| division with automatic determination of the appropriate result type.
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2>
bool | operator< (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r)
| less than
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2>
bool | operator<= (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r)
| less or equal
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2>
bool | operator== (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r)
| equal
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2>
bool | operator> (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r)
| greater
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2>
bool | operator>= (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r)
| greater or equal
template<int IntBits, FPOverflowHandling OverflowHandling>
Int32 | round (FixedPoint16< IntBits, OverflowHandling > v)
| rounding to the nearest integer.
template<int IntBits, FPOverflowHandling OverflowHandling>
Int32 | roundi (FixedPoint16< IntBits, OverflowHandling > v)
| rounding to the nearest integer.
template<int IntBits, FPOverflowHandling OverflowHandling>
SquareRootTraits< FixedPoint16 < IntBits, OverflowHandling > >::SquareRootResult | sqrt (FixedPoint16< IntBits, OverflowHandling > v)
| square root.
template<int IntBits, FPOverflowHandling OverflowHandling>
NormTraits< FixedPoint16 < IntBits, OverflowHandling > >::SquaredNormType | squaredNorm (FixedPoint16< IntBits, OverflowHandling > v)
| squared norm (same as v*v).
template<int IntBits1, FPOverflowHandling OverflowHandling, int IntBits2, int IntBits3>
FixedPoint16< IntBits3, OverflowHandling > & | sub (FixedPoint16< IntBits1, OverflowHandling > l, FixedPoint16< IntBits2, OverflowHandling > r, FixedPoint16< IntBits3, OverflowHandling > &result)
| subtraction with enforced result type.

## Detailed Description

#include <vigra/fixedpoint.hxx>

These functions fulfill the requirements of an AlgebraicRing.

Namespace: vigra

## Function Documentation

TARGET fixed_point_cast | ( | FixedPoint16< IntBits, OverflowHandling > | v | ) |

Convert a FixedPoint16 to a built-in type. If the target is integral, the value is rounded.
Usage:

FixedPoint16<16,15> fp(...);
double d = fixed_point_cast<double>(fp);

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python vigra 1.11.1 (Fri May 19 2017)