Vuo
1.1.1
|
A floating-point number.
Typedefs | |
typedef double | VuoReal |
A floating-point number. | |
Functions | |
json_object * | VuoReal_getJson (const VuoReal value) |
Encodes value as a JSON object. | |
char * | VuoReal_getSummary (const VuoReal value) |
Returns a string representation of value (either decimal or scientific notation, whichever is shorter). | |
VuoReal | VuoReal_makeFromJson (struct json_object *js) |
Decodes the JSON object js , expected to contain a double, to create a new value. | |
VuoReal | VuoReal_min (VuoReal *terms, unsigned long termsCount) |
Returns the minimum of an array of terms, or 0 if the array is empty. | |
VuoReal | VuoReal_max (VuoReal *terms, unsigned long termsCount) |
Returns the maximum of an array of terms, or 0 if the array is empty. | |
VuoReal | VuoReal_average (VuoList_VuoReal values) |
Returns the average of the values in the list, or 0 if the list is empty. | |
VuoReal | VuoReal_wrap (VuoReal value, VuoReal minimum, VuoReal maximum) |
Returns value if it is within the range of minimum to maximum (exclusive), otherwise a value wrapped with modular arithmetic to be within the range. | |
VuoReal | VuoReal_random (const VuoReal minimum, const VuoReal maximum) |
Returns a pseudorandom value between minimum and maximum . | |
VuoReal | VuoReal_randomWithState (unsigned short state[3], const VuoReal minimum, const VuoReal maximum) |
Returns a pseudorandom value between minimum and maximum . | |
static VuoReal | VuoReal_add (VuoReal a, VuoReal b) __attribute__((const )) |
a+b | |
static VuoReal | VuoReal_subtract (VuoReal a, VuoReal b) __attribute__((const )) |
a-b | |
static VuoReal | VuoReal_multiply (VuoReal a, VuoReal b) __attribute__((const )) |
a*b | |
static VuoReal | VuoReal_scale (VuoReal a, VuoReal b) __attribute__((const )) |
Same as VuoReal_multiply. | |
static VuoReal | VuoReal_divide (VuoReal a, VuoReal b) __attribute__((const )) |
a/b | |
static VuoReal | VuoReal_makeNonzero (VuoReal a) __attribute__((const )) |
If the value is zero or very close to zero, moves the value further from zero (either 0.000001 or -0.000001). | |
static VuoReal | VuoReal_distance (VuoReal a, VuoReal b) __attribute__((const )) |
Distance between a and b . | |
static VuoReal | VuoReal_lerp (VuoReal a, VuoReal b, float t) __attribute__((const )) |
Returns a linearly interpolated value between a and b using time t . | |
static VuoReal | VuoReal_spring (VuoReal timeSinceDrop, VuoReal dropPosition, VuoReal restingPosition, VuoReal period, VuoReal damping) |
Calculates a position along the path of an oscillating spring. | |
static VuoReal | VuoReal_clamp (VuoReal value, VuoReal min, VuoReal max) |
Limits value to values between min and max , inclusive. | |
static VuoReal | VuoReal_bezier3 (VuoReal p0, VuoReal p1, VuoReal p2, VuoReal p3, VuoReal time) |
Calculates a position along a cubic bezier curve. | |
static VuoReal | VuoReal_snap (VuoReal a, VuoReal center, VuoReal snap) |
Snap value a to the nearest increment of value snap. | |
static bool | VuoReal_areEqual (const VuoReal value1, const VuoReal value2) |
Returns true if the two values are equal (within a small tolerance). | |
VuoReal | VuoReal_makeFromString (const char *str) |
Automatically generated function. | |
char * | VuoReal_getString (const VuoReal value) |
Automatically generated function. | |
void | VuoReal_retain (VuoReal value) |
Automatically generated function. | |
void | VuoReal_release (VuoReal value) |
Automatically generated function. | |
typedef double VuoReal |
A floating-point number.
a+b
Provided for generic type equivalence with VuoPoints.
Returns true if the two values are equal (within a small tolerance).
VuoReal VuoReal_average | ( | VuoList_VuoReal | values | ) |
Returns the average of the values in the list, or 0 if the list is empty.
|
inlinestatic |
Calculates a position along a cubic bezier curve.
p0 | The curve's starting position. |
p1 | The control point for the curve's starting position. |
p2 | The control point for the curve's ending position. |
p3 | The curve's ending position. |
time | Which value along the curve should be returned. 0 = starting position, 1 = ending position. |
Limits value
to values between min
and max
, inclusive.
Distance between a
and b
.
a/b
Provided for generic type equivalence with VuoPoints.
|
read |
Encodes value
as a JSON object.
char* VuoReal_getString | ( | const VuoReal | value | ) |
Automatically generated function.
char * VuoReal_getSummary | ( | const VuoReal | value | ) |
Returns a string representation of value
(either decimal or scientific notation, whichever is shorter).
Returns a linearly interpolated value between a
and b
using time t
.
t
is between 0 and 1.
VuoReal VuoReal_makeFromJson | ( | struct json_object * | js | ) |
Decodes the JSON object js
, expected to contain a double, to create a new value.
VuoReal VuoReal_makeFromString | ( | const char * | str | ) |
Automatically generated function.
If the value is zero or very close to zero, moves the value further from zero (either 0.000001 or -0.000001).
Returns the maximum of an array of terms, or 0 if the array is empty.
Returns the minimum of an array of terms, or 0 if the array is empty.
a*b
Provided for generic type equivalence with VuoPoints.
Returns a pseudorandom value between minimum
and maximum
.
VuoReal VuoReal_randomWithState | ( | unsigned short | state[3], |
const VuoReal | minimum, | ||
const VuoReal | maximum | ||
) |
Returns a pseudorandom value between minimum
and maximum
.
void VuoReal_release | ( | VuoReal | value | ) |
Automatically generated function.
void VuoReal_retain | ( | VuoReal | value | ) |
Automatically generated function.
Same as VuoReal_multiply.
Provided for generic type equivalence with VuoPoints.
Snap value a to the nearest increment of value snap.
|
inlinestatic |
Calculates a position along the path of an oscillating spring.
a-b
Provided for generic type equivalence with VuoPoints.