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

Go to the source code of this file.

Macros

#define srand48(X)   static_assert(0, "Use SYSsrand48() instead")
 
#define drand48(X)   0; { static_assert(0, "Use SYSdrand48() instead"); }
 
#define SYSmax(a, b)   ((a) > (b) ? (a) : (b))
 
#define SYSmin(a, b)   ((a) < (b) ? (a) : (b))
 
#define SYSabs(a)   ((a) < 0 ? (a) : -(a))
 

Functions

SYS_API void SYSsrand48 (long seed)
 
SYS_API double SYSdrand48 ()
 
template<typename F >
constexpr int SYSsignum (const F a) noexcept
 
template<typename F >
constexpr bool SYSisNan (const F f)
 
template<>
bool SYSisNan (const fpreal16 f)
 
SYS_API bool SYSisNan (const char *number)
 SYSisNan() checks whether the string represents a non-finite number. More...
 
SYS_API bool SYSisInt (const char *str)
 
SYS_API bool SYSisFloat (const char *str)
 
SYS_API fpreal32 SYSroundAngle (fpreal32 base, fpreal32 source)
 
SYS_API fpreal64 SYSroundAngle (fpreal64 base, fpreal64 source)
 
SYS_API fpreal64 SYSroundAngle (int32 base, int32 source)
 
SYS_API fpreal64 SYSroundAngle (int64 base, int64 source)
 
SYS_API bool SYSisPrime (uint num)
 
SYS_API bool SYSisPrime (uint64 num)
 
SYS_API uint SYSmakePrime (uint num)
 
SYS_API uint64 SYSmakePrime (uint64 num)
 
bool SYSisFinite (fpreal64 f)
 
bool SYSisFinite (fpreal32 f)
 
bool SYSisFinite (fpreal16 f)
 
constexpr bool SYSisFinite (int32 f)
 
constexpr bool SYSisFinite (int64 f)
 

Macro Definition Documentation

#define drand48 (   X)    0; { static_assert(0, "Use SYSdrand48() instead"); }

Definition at line 161 of file SYS_Math.h.

#define srand48 (   X)    static_assert(0, "Use SYSsrand48() instead")

Definition at line 160 of file SYS_Math.h.

#define SYSabs (   a)    ((a) < 0 ? (a) : -(a))
Examples:
CHOP/CHOP_Spring.C, RAY/RAY_DemoStamp.C, and SOP/SOP_BouncyAgent.C.

Definition at line 1515 of file SYS_Math.h.

#define SYSmax (   a,
  b 
)    ((a) > (b) ? (a) : (b))

Function Documentation

SYS_API double SYSdrand48 ( )
bool SYSisFinite ( fpreal64  f)
inline

Check whether a number is finite. That is, not Nan and not infinity.

See Also
SYSisNan()

Definition at line 194 of file SYS_Math.h.

bool SYSisFinite ( fpreal32  f)
inline

Check whether a number is finite. That is, not Nan and not infinity.

See Also
SYSisNan()

Definition at line 195 of file SYS_Math.h.

bool SYSisFinite ( fpreal16  f)
inline

Check whether a number is finite. That is, not Nan and not infinity.

See Also
SYSisNan()

Definition at line 196 of file SYS_Math.h.

constexpr bool SYSisFinite ( int32  f)
inline

Check whether a number is finite. That is, not Nan and not infinity.

See Also
SYSisNan()

Definition at line 197 of file SYS_Math.h.

constexpr bool SYSisFinite ( int64  f)
inline

Check whether a number is finite. That is, not Nan and not infinity.

See Also
SYSisNan()

Definition at line 198 of file SYS_Math.h.

SYS_API bool SYSisFloat ( const char *  str)
SYS_API bool SYSisInt ( const char *  str)
template<typename F >
constexpr bool SYSisNan ( const f)
inline

Definition at line 178 of file SYS_Math.h.

template<>
bool SYSisNan ( const fpreal16  f)
inline

Definition at line 185 of file SYS_Math.h.

SYS_API bool SYSisNan ( const char *  number)

SYSisNan() checks whether the string represents a non-finite number.

SYS_API bool SYSisPrime ( uint  num)
SYS_API bool SYSisPrime ( uint64  num)
SYS_API uint SYSmakePrime ( uint  num)
SYS_API uint64 SYSmakePrime ( uint64  num)
SYS_API fpreal32 SYSroundAngle ( fpreal32  base,
fpreal32  source 
)
SYS_API fpreal64 SYSroundAngle ( fpreal64  base,
fpreal64  source 
)
SYS_API fpreal64 SYSroundAngle ( int32  base,
int32  source 
)
SYS_API fpreal64 SYSroundAngle ( int64  base,
int64  source 
)
template<typename F >
constexpr int SYSsignum ( const a)
inlinenoexcept

Definition at line 170 of file SYS_Math.h.

SYS_API void SYSsrand48 ( long  seed)
Examples:
VEX/VEX_Example.C.