pl-nk v0.4.5
Plonk|Plink|Plank are a set of cross-platform C/C++ frameworks for audio software development
Functions
Binary arithmetic operator functions
Other Plonk user functions

Binary arithmetic operator functions. More...

Functions

template<class Type >
Type addop (Type const &a, Type const &b) throw ()
 Convenient inline function for the '+' operator.
template<class Type >
Type subop (Type const &a, Type const &b) throw ()
 Convenient inline function for the '-' operator.
template<class Type >
Type mulop (Type const &a, Type const &b) throw ()
 Convenient inline function for the '*' operator.
template<class Type >
Type divop (Type const &a, Type const &b) throw ()
 Convenient inline function for the '/' operator.
template<class Type >
Type modop (Type const &a, Type const &b) throw ()
 Convenient inline function for the '%' operator.
float modop (float const &a, float const &b) throw ()
 Convenient inline function for the '%' operator (float).
double modop (double const &a, double const &b) throw ()
 Convenient inline function for the '%' operator (double).
template<class Type >
Type isEqualTo (Type const &a, Type const &b) throw ()
 Returns 1 if the inputs are equal otherwise returns 0.
template<class Type >
Type isNotEqualTo (Type const &a, Type const &b) throw ()
 Returns 1 if the inputs are not equal otherwise returns 0.
template<class Type >
Type isGreaterThan (Type const &a, Type const &b) throw ()
 Returns 1 if the a is greater than b otherwise returns 0.
template<class Type >
Type isGreaterThanOrEqualTo (Type const &a, Type const &b) throw ()
 Returns 1 if the a is greater than or equal to b otherwise returns 0.
template<class Type >
Type isLessThan (Type const &a, Type const &b) throw ()
 Returns 1 if the a is less than b otherwise returns 0.
template<class Type >
Type isLessThanOrEqualTo (Type const &a, Type const &b) throw ()
 Returns 1 if the a is less than or equal to b otherwise returns 0.
template<class Type >
Type hypot (Type const &a, Type const &b) throw ()
 Returns $ \sqrt{ a^2 + b^2 } $.
template<class Type >
Type atan2 (Type const &a, Type const &b) throw ()
 Returns $ atan2(a,b) $.
template<class Type >
Type sumsqr (Type const &a, Type const &b) throw ()
 Returns $ a * a + b * b $.
template<class Type >
Type difsqr (Type const &a, Type const &b) throw ()
 Returns $ a * a - b * b $.
template<class Type >
Type sqrsum (Type const &a, Type const &b) throw ()
 Returns $ (a + b) * (a + b) $.
template<class Type >
Type sqrdif (Type const &a, Type const &b) throw ()
 Returns $ (a - b) * (a - b) $.
template<class Type >
Type absdif (Type const &a, Type const &b) throw ()
 Returns the absolute difference between the input arguments.
template<class Type >
Type thresh (Type const &a, Type const &b) throw ()
 If a is less than b returns 0 otherwise return a.
template<class Type >
Type min (Type const &a, Type const &b) throw ()
 Returns minimum of a and b.
template<class Type >
Type max (Type const &a, Type const &b) throw ()
 Returns maximum of a and b.
template<class Type >
Type pow (Type const &a, Type const &b) throw ()
 Returns a raised to the power b.
template<class Type >
Type squared (Type const &a) throw ()
 Returns the input argument squared.
template<class Type >
Type cubed (Type const &a) throw ()
 Returns the input argument cubed.

Detailed Description

Binary arithmetic operator functions.


Function Documentation

template<class Type >
Type absdif ( Type const &  a,
Type const &  b 
) throw () [inline]

Returns the absolute difference between the input arguments.

template<class Type >
Type addop ( Type const &  a,
Type const &  b 
) throw () [inline]

Convenient inline function for the '+' operator.

template<class Type >
Type atan2 ( Type const &  a,
Type const &  b 
) throw () [inline]

Returns $ atan2(a,b) $.

template<class Type >
Type difsqr ( Type const &  a,
Type const &  b 
) throw () [inline]

Returns $ a * a - b * b $.

template<class Type >
Type divop ( Type const &  a,
Type const &  b 
) throw () [inline]

Convenient inline function for the '/' operator.

template<class Type >
Type hypot ( Type const &  a,
Type const &  b 
) throw () [inline]

Returns $ \sqrt{ a^2 + b^2 } $.

template<class Type >
Type isEqualTo ( Type const &  a,
Type const &  b 
) throw () [inline]

Returns 1 if the inputs are equal otherwise returns 0.

template<class Type >
Type isGreaterThan ( Type const &  a,
Type const &  b 
) throw () [inline]

Returns 1 if the a is greater than b otherwise returns 0.

template<class Type >
Type isGreaterThanOrEqualTo ( Type const &  a,
Type const &  b 
) throw () [inline]

Returns 1 if the a is greater than or equal to b otherwise returns 0.

template<class Type >
Type isLessThan ( Type const &  a,
Type const &  b 
) throw () [inline]

Returns 1 if the a is less than b otherwise returns 0.

template<class Type >
Type isLessThanOrEqualTo ( Type const &  a,
Type const &  b 
) throw () [inline]

Returns 1 if the a is less than or equal to b otherwise returns 0.

template<class Type >
Type isNotEqualTo ( Type const &  a,
Type const &  b 
) throw () [inline]

Returns 1 if the inputs are not equal otherwise returns 0.

double modop ( double const &  a,
double const &  b 
) throw () [inline]

Convenient inline function for the '%' operator (double).

template<class Type >
Type modop ( Type const &  a,
Type const &  b 
) throw () [inline]

Convenient inline function for the '%' operator.

float modop ( float const &  a,
float const &  b 
) throw () [inline]

Convenient inline function for the '%' operator (float).

template<class Type >
Type mulop ( Type const &  a,
Type const &  b 
) throw () [inline]

Convenient inline function for the '*' operator.

template<class Type >
Type sqrdif ( Type const &  a,
Type const &  b 
) throw () [inline]

Returns $ (a - b) * (a - b) $.

template<class Type >
Type sqrsum ( Type const &  a,
Type const &  b 
) throw () [inline]

Returns $ (a + b) * (a + b) $.

template<class Type >
Type subop ( Type const &  a,
Type const &  b 
) throw () [inline]

Convenient inline function for the '-' operator.

template<class Type >
Type sumsqr ( Type const &  a,
Type const &  b 
) throw () [inline]

Returns $ a * a + b * b $.

template<class Type >
Type thresh ( Type const &  a,
Type const &  b 
) throw () [inline]

If a is less than b returns 0 otherwise return a.

 All Classes Functions Typedefs Enumerations Enumerator Properties