Vuo 2.4.4
Loading...
Searching...
No Matches
Macros | Typedefs | Functions
VuoInteger.h File Reference

Description

VuoInteger C type definition.

Definition in file VuoInteger.h.

Go to the source code of this file.

Macros

#define VuoInteger_SUPPORTS_COMPARISON
 Instances of this type can be compared and sorted.
 
#define MIN(a, b)   (((a)<(b))?(a):(b))
 Returns the smaller of a and b.
 
#define MAX(a, b)   (((a)>(b))?(a):(b))
 Returns the larger of a and b.
 

Typedefs

typedef int64_t VuoInteger
 A signed 64-bit integer.
 

Functions

VuoInteger VuoInteger_makeFromJson (json_object *js)
 Decodes the JSON object js to create a new value.
 
json_object * VuoInteger_getJson (const VuoInteger value)
 Encodes value as a JSON object.
 
char * VuoInteger_getSummary (const VuoInteger value)
 Always shows the full value, since it's guaranteed to be pretty short.
 
VuoInteger VuoInteger_minList (VuoList_VuoInteger values, VuoInteger *outputPosition)
 Returns the minimum of a list of terms, or 0 if the array is empty.
 
VuoInteger VuoInteger_maxList (VuoList_VuoInteger values, VuoInteger *outputPosition)
 Returns the maximum of a list of terms, or 0 if the array is empty.
 
VuoInteger VuoInteger_average (VuoList_VuoInteger values)
 Returns the average of the values in the list, or 0 if the list is empty.
 
VuoInteger VuoInteger_wrap (VuoInteger value, VuoInteger minimum, VuoInteger maximum)
 Returns value if it is within the range of minimum to maximum (inclusive), otherwise a value wrapped with modular arithmetic to be within the range.
 
VuoInteger VuoInteger_random (const VuoInteger minimum, const VuoInteger maximum)
 Returns a pseudorandom value between minimum and maximum, inclusive.
 
void VuoInteger_setRandomState (unsigned short state[3], const VuoInteger seed)
 Initializes state using the lower 48 bits of seed.
 
VuoInteger VuoInteger_randomWithState (unsigned short state[3], const VuoInteger minimum, const VuoInteger maximum)
 Returns a pseudorandom value between minimum and maximum, inclusive.
 
VuoInteger VuoInteger_makeFromHexByte (unsigned char byte)
 If byte is a valid ASCII hex character (0–9, a–f, A–F), returns the equivalent numeric value.
 
static VuoInteger VuoInteger_add (VuoInteger a, VuoInteger b) __attribute__((const))
 a+b
 
static VuoInteger VuoInteger_subtract (VuoInteger a, VuoInteger b) __attribute__((const))
 a-b
 
static VuoInteger VuoInteger_multiply (VuoInteger a, VuoInteger b) __attribute__((const))
 Provided for generic type equivalence with VuoPoints.
 
static VuoInteger VuoInteger_scale (VuoInteger a, VuoInteger b) __attribute__((const))
 Provided for generic type equivalence with VuoPoints.
 
static VuoInteger VuoInteger_divide (VuoInteger a, VuoInteger b) __attribute__((const))
 a/b
 
static VuoInteger VuoInteger_makeNonzero (VuoInteger a) __attribute__((const))
 If the value is zero, returns 1.
 
static VuoInteger VuoInteger_snap (VuoInteger a, VuoInteger center, VuoInteger snap) __attribute__((const))
 Returns a snapped value using a center point and snap value.
 
bool VuoInteger_areEqual (const VuoInteger value1, const VuoInteger value2)
 Returns true if the two values are equal.
 
bool VuoInteger_areEqualListWithinTolerance (VuoList_VuoInteger values, VuoInteger tolerance)
 Returns true if the two values are equal within tolerance.
 
bool VuoInteger_isLessThan (const VuoInteger a, const VuoInteger b)
 Returns true if a < b.
 
bool VuoInteger_isWithinRange (VuoInteger value, VuoInteger minimum, VuoInteger maximum)
 Returns true if value is between minimum and maximum.
 
static VuoInteger VuoInteger_clamp (VuoInteger value, VuoInteger limitA, VuoInteger limitB)
 Limits value to values between min and max, inclusive.
 
static VuoInteger VuoInteger_clampn (VuoInteger value, VuoInteger limitA, VuoInteger limitB)
 Same as VuoInteger_clamp.
 
char * VuoInteger_getString (const VuoInteger value)
 Automatically generated function.
 
void VuoInteger_retain (VuoInteger value)
 Automatically generated function.
 
void VuoInteger_release (VuoInteger value)
 Automatically generated function.