Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

kmath.h File Reference

Mathematic functions. More...

#include "ktypes.h"

Functions

KTL_API KDouble k_exp (KDouble v)
 Compute the exponent of a floating-point number.
KTL_API KDouble k_log (KDouble v)
 Returns the natural logarithm of the parameter.
KTL_API KDouble k_pow (KDouble value, KDouble p)
 Returns a value raised to a power exponent.
KTL_API KDouble k_fabs (KDouble v)
 Returns the absolute value of the parameter.
KTL_API KInt k_abs (KInt v)
 Returns the absolute value of the parameter.
KTL_API KDouble k_tan (KDouble v)
 Returns the tangent of an angle specified by the parameter.
KTL_API KDouble k_cos (KDouble v)
 Returns the cosine of an angle specified by the parameter.
KTL_API KDouble k_sin (KDouble v)
 Returns the sine of an angle specified by the parameter.
KTL_API KDouble k_atan2 (KDouble x, KDouble y)
 Returns the principal value of the arc tangent of the parameters.
KTL_API KDouble k_sqrt (KDouble v)
 Returns the square root of the parameter.
KTL_API KDouble k_floor (KDouble v)
 Returns the largest integral value that is not greater than the parameter.
KTL_API KDouble k_ceil (KDouble v)
 Returns the smallest integral value that is not less than the parameter.
KTL_API KInt32 k_round (KDouble x)
 Rounds to an integral number the given parameter.
KTL_API KInt32 k_roundf (KFloat x)
 Rounds to an integral number the given parameter.


Detailed Description

Mathematic functions.

Version:
KToolLib-1.0
Author:
Fabien Gallot
Date:
27/03/2009
Note:
Copyright © 2008-2010 iKlax Media SAS (www.iklaxmedia.com). All rights reserved.

Function Documentation

KTL_API KInt k_abs KInt  v  ) 
 

Returns the absolute value of the parameter.

Parameters:
v the integral number to be computed
Returns:
the absolute value of v

KTL_API KDouble k_atan2 KDouble  x,
KDouble  y
 

Returns the principal value of the arc tangent of the parameters.

Parameters:
x the floating point number representing an x-coordinate
y the floating point number representing an y-coordinate
Returns:
the principal arc tangent of y/x in radians

KTL_API KDouble k_ceil KDouble  v  ) 
 

Returns the smallest integral value that is not less than the parameter.

Parameters:
v the floating point number
Returns:
the smallest integral value not less than v

KTL_API KDouble k_cos KDouble  v  ) 
 

Returns the cosine of an angle specified by the parameter.

Parameters:
v the floating point number representing an angle expressed in radians
Returns:
the cosine of v

KTL_API KDouble k_exp KDouble  v  ) 
 

Compute the exponent of a floating-point number.

Parameters:
v Specifies the floating-point number for which the exponent is computed
Returns:
the exponent of x

KTL_API KDouble k_fabs KDouble  v  ) 
 

Returns the absolute value of the parameter.

Parameters:
v the floating point number to be computed
Returns:
the absolute value of v

KTL_API KDouble k_floor KDouble  v  ) 
 

Returns the largest integral value that is not greater than the parameter.

Parameters:
v the floating point number
Returns:
the largest integral value not greater than v

KTL_API KDouble k_log KDouble  v  ) 
 

Returns the natural logarithm of the parameter.

Parameters:
v the floating point number
Returns:
the natural logarithm of v

KTL_API KDouble k_pow KDouble  value,
KDouble  p
 

Returns a value raised to a power exponent.

Parameters:
value the floating point number value
p the floating point number exponent
Returns:
the result of raising value to the power exponent

HUGE_VAL for overflow cases

KTL_API KInt32 k_round KDouble  x  ) 
 

Rounds to an integral number the given parameter.

Parameters:
x the floating point number (KDouble)
Returns:
the integral number value rounded

KTL_API KInt32 k_roundf KFloat  x  ) 
 

Rounds to an integral number the given parameter.

Parameters:
x the floating point number (KFloat)
Returns:
the integral number value rounded

KTL_API KDouble k_sin KDouble  v  ) 
 

Returns the sine of an angle specified by the parameter.

Parameters:
v the floating point number representing an angle expressed in radians
Returns:
the sine of v

KTL_API KDouble k_sqrt KDouble  v  ) 
 

Returns the square root of the parameter.

Parameters:
v the floating point number
Returns:
the square root of v

KTL_API KDouble k_tan KDouble  v  ) 
 

Returns the tangent of an angle specified by the parameter.

Parameters:
v the floating point number representing an angle expressed in radians
Returns:
the tangent of v


Generated on Tue Mar 9 10:49:30 2010 for iKlax Tools Library (KToolLib) by doxygen 1.3.8