Vuo
0.9.1
|
A signed 64-bit integer.
Typedefs | |
typedef int64_t | VuoInteger |
A signed 64-bit integer. | |
Functions | |
VuoInteger | VuoInteger_valueFromJson (json_object *js) |
Decodes the JSON object js , expected to contain a 64-bit integer, to create a new value. | |
json_object * | VuoInteger_jsonFromValue (const VuoInteger value) |
Encodes value as a JSON object. | |
char * | VuoInteger_summaryFromValue (const VuoInteger value) |
Always shows the full value, since it's guaranteed to be pretty short. | |
VuoInteger | VuoInteger_min (VuoInteger *terms, unsigned long termsCount) |
Returns the minimum of an array of terms, or 0 if the array is empty. | |
VuoInteger | VuoInteger_max (VuoInteger *terms, unsigned long termsCount) |
Returns the maximum of an array of terms, or 0 if the array 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. | |
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_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. | |
VuoInteger | VuoInteger_valueFromString (const char *str) |
Automatically generated function. | |
char * | VuoInteger_stringFromValue (const VuoInteger value) |
Automatically generated function. | |
void | VuoInteger_retain (VuoInteger value) |
Automatically generated function. | |
void | VuoInteger_release (VuoInteger value) |
Automatically generated function. | |
typedef int64_t VuoInteger |
A signed 64-bit integer.
|
inlinestatic |
a+b
Provided for generic type equivalence with VuoPoints.
|
read |
Encodes value
as a JSON object.
|
inlinestatic |
If the value is zero, returns 1.
Otherwise returns the value.
VuoInteger VuoInteger_max | ( | VuoInteger * | terms, |
unsigned long | termsCount | ||
) |
Returns the maximum of an array of terms, or 0 if the array is empty.
VuoInteger VuoInteger_min | ( | VuoInteger * | terms, |
unsigned long | termsCount | ||
) |
Returns the minimum of an array of terms, or 0 if the array is empty.
VuoInteger VuoInteger_random | ( | const VuoInteger | minimum, |
const VuoInteger | maximum | ||
) |
Returns a pseudorandom value between minimum
and maximum
, inclusive.
This function uses arc4random_uniform()
(the key stream generator employed by the arc4 cipher). It is self-seeding.
Both maximum
and maximum - minimum
must be INT_MAX
(2^31) or less.
VuoInteger VuoInteger_randomWithState | ( | unsigned short | state[3], |
const VuoInteger | minimum, | ||
const VuoInteger | maximum | ||
) |
Returns a pseudorandom value between minimum
and maximum
, inclusive.
This function uses jrand48()
(a linear congruential algorithm).
Seed it by providing 3 x 16-bit values to state
, which is modified upon return. Pass the modified state
back to this function to retrieve the next value in the sequence.
Both maximum
and maximum - minimum
must be INT_MAX
(2^31) or less.
void VuoInteger_release | ( | VuoInteger | value | ) |
Automatically generated function.
void VuoInteger_retain | ( | VuoInteger | value | ) |
Automatically generated function.
void VuoInteger_setRandomState | ( | unsigned short | state[3], |
const VuoInteger | seed | ||
) |
Initializes state
using the lower 48 bits of seed
.
|
inlinestatic |
Returns a snapped value using a center point and snap value.
char* VuoInteger_stringFromValue | ( | const VuoInteger | value | ) |
Automatically generated function.
|
inlinestatic |
a-b
Provided for generic type equivalence with VuoPoints.
char * VuoInteger_summaryFromValue | ( | const VuoInteger | value | ) |
Always shows the full value, since it's guaranteed to be pretty short.
VuoInteger VuoInteger_valueFromJson | ( | json_object * | js | ) |
Decodes the JSON object js
, expected to contain a 64-bit integer, to create a new value.
VuoInteger VuoInteger_valueFromString | ( | const char * | str | ) |
Automatically generated function.
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.