HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SYS_Floor.h File Reference
#include "SYS_API.h"
#include <math.h>
#include "SYS_Types.h"
+ Include dependency graph for SYS_Floor.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

SYS_API fpreal32 SYSfloor (const fpreal32 val)
 
SYS_API fpreal32 SYSceil (const fpreal32 val)
 
SYS_API fpreal32 SYSfrac (const fpreal32 val)
 
SYS_API fpreal64 SYSfrac (const fpreal64 val)
 
fpreal32 SYSfloorIL (const fpreal32 val)
 
fpreal64 SYSfloorIL (const fpreal64 val)
 
fpreal32 SYSceilIL (const fpreal32 val)
 
fpreal64 SYSceilIL (const fpreal64 val)
 
fpreal32 SYSfracIL (const fpreal32 val)
 
fpreal64 SYSfracIL (const fpreal64 val)
 
fpreal32 SYSrint (const fpreal32 val)
 
fpreal64 SYSrint (const fpreal64 val)
 
SYS_API fpreal64 SYSniceNumber (const fpreal64 num, const int digits=6)
 

Function Documentation

SYS_API fpreal32 SYSceil ( const fpreal32  val)
fpreal32 SYSceilIL ( const fpreal32  val)
inline

Definition at line 88 of file SYS_Floor.h.

fpreal64 SYSceilIL ( const fpreal64  val)
inline

Definition at line 89 of file SYS_Floor.h.

fpreal32 SYSfloorIL ( const fpreal32  val)
inline

Definition at line 59 of file SYS_Floor.h.

fpreal64 SYSfloorIL ( const fpreal64  val)
inline

Definition at line 87 of file SYS_Floor.h.

SYS_API fpreal32 SYSfrac ( const fpreal32  val)
SYS_API fpreal64 SYSfrac ( const fpreal64  val)
fpreal32 SYSfracIL ( const fpreal32  val)
inline

Definition at line 139 of file SYS_Floor.h.

fpreal64 SYSfracIL ( const fpreal64  val)
inline

Definition at line 158 of file SYS_Floor.h.

SYS_API fpreal64 SYSniceNumber ( const fpreal64  num,
const int  digits = 6 
)

SYSniceNumber() will limit the precision of decimal digits, but leave the integer portion of a number at full precision. Thus:

SYSniceNumber(1234.56, 2) == 1235; // (note the rounding)
SYSniceNumber(0.0123456, 2) == 0.012;
SYSniceNumber(1.23456e-14,2) == 1.2e-14;

Note that 6 digits is almost enough to represent a single precision float.

fpreal32 SYSrint ( const fpreal32  val)
inline
Examples:
field3d/ROP_Field3D.C.

Definition at line 164 of file SYS_Floor.h.

fpreal64 SYSrint ( const fpreal64  val)
inline

Definition at line 170 of file SYS_Floor.h.