maxscript/foundation/numbers.h File Reference

numbers.h File Reference

Macros

#define FLOAT_CACHE_SIZE   1024
 
#define DOUBLE_CACHE_SIZE   512
 
#define INT_CACHE_SIZE   512
 
#define INT64_CACHE_SIZE   128
 
#define LOW_INT_RANGE   100
 
#define is_integer_number(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(Integer) || (v)->tag == class_tag(Integer64) || (v)->tag == class_tag(IntegerPtr))
 
#define integer_type_check(v, where)   if (!is_integer_number(v)) type_check(v, Integer, where)
 
#define is_float_number(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(Float) || (v)->tag == class_tag(Double))
 
#define float_type_check(v, where)   if (!is_float_number(v)) type_check(v, Float, where)
 
#define is_number(o)   (is_integer_number(o) || is_float_number(o))
 
#define is_double(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(Double))
 
#define is_integer(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(Integer))
 
#define is_integer64(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(Integer64))
 
#define is_integerptr(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(IntegerPtr))
 
#define is_float(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(Float))
 
#define is_double(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(Double))
 
#define is_int(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(Integer))
 
#define is_int64(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(Integer64))
 
#define is_intptr(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(IntegerPtr))
 

Variables

Float * float_cache []
 
Double * double_cache []
 
Integer * int_cache []
 
Integer64 * int64_cache []
 

Macro Definition Documentation

#define FLOAT_CACHE_SIZE   1024
#define DOUBLE_CACHE_SIZE   512
#define INT_CACHE_SIZE   512
#define INT64_CACHE_SIZE   128
#define LOW_INT_RANGE   100
#define is_integer_number (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(Integer) || (v)->tag == class_tag(Integer64) || (v)->tag == class_tag(IntegerPtr))
#define integer_type_check (   v,
  where 
)    if (!is_integer_number(v)) type_check(v, Integer, where)
#define is_float_number (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(Float) || (v)->tag == class_tag(Double))
#define float_type_check (   v,
  where 
)    if (!is_float_number(v)) type_check(v, Float, where)
#define is_number (   o)    (is_integer_number(o) || is_float_number(o))
#define is_double (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(Double))
#define is_integer (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(Integer))
#define is_integer64 (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(Integer64))
#define is_integerptr (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(IntegerPtr))
#define is_float (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(Float))
#define is_double (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(Double))
#define is_int (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(Integer))
#define is_int64 (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(Integer64))
#define is_intptr (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(IntegerPtr))

Variable Documentation

Float* float_cache[]
Double* double_cache[]
Integer* int_cache[]
Integer64* int64_cache[]