Fast approximations for math functions on limited precision floats. More...
Modules | |
Basic Math Functors in the Math API | |
Basic math functors in the Math API. | |
Functions | |
Float32 | mi::math::fast_sqrt (Float32 i) |
A fast implementation of sqrt(x) for floats. More... | |
Float32 | mi::math::fast_exp (Float32 x) |
A fast implementation of exp for floats. More... | |
Float32 | mi::math::fast_pow2 (Float32 x) |
A fast implementation of pow(2,x) for floats. More... | |
Float32 | mi::math::fast_log2 (Float32 i) |
A fast implementation of log2(x) for floats. More... | |
Float32 | mi::math::fast_pow (Float32 b, Float32 e) |
A fast implementation of pow(x,y) for floats. More... | |
Float32 | mi::math::acos (Float32 s) |
Returns the arc cosine of s in radians. More... | |
Float64 | mi::math::acos (Float64 s) |
Returns the arc cosine of s in radians. More... | |
bool | mi::math::all (Uint8 v) |
Returns true if v is not equal to zero. More... | |
bool | mi::math::all (Uint16 v) |
Returns true if v is not equal to zero. More... | |
bool | mi::math::all (Uint32 v) |
Returns true if v is not equal to zero. More... | |
bool | mi::math::all (Uint64 v) |
Returns true if v is not equal to zero. More... | |
bool | mi::math::all (Sint8 v) |
Returns true if v is not equal to zero. More... | |
bool | mi::math::all (Sint16 v) |
Returns true if v is not equal to zero. More... | |
bool | mi::math::all (Sint32 v) |
Returns true if v is not equal to zero. More... | |
bool | mi::math::all (Sint64 v) |
Returns true if v is not equal to zero. More... | |
bool | mi::math::all (Float32 v) |
Returns true if v is not equal to zero. More... | |
bool | mi::math::all (Float64 v) |
Returns true if v is not equal to zero. More... | |
bool | mi::math::any (Uint8 v) |
Returns true if v is not equal to zero. More... | |
bool | mi::math::any (Uint16 v) |
Returns true if v is not equal to zero. More... | |
bool | mi::math::any (Uint32 v) |
Returns true if v is not equal to zero. More... | |
bool | mi::math::any (Uint64 v) |
Returns true if v is not equal to zero. More... | |
bool | mi::math::any (Sint8 v) |
Returns true if v is not equal to zero. More... | |
bool | mi::math::any (Sint16 v) |
Returns true if v is not equal to zero. More... | |
bool | mi::math::any (Sint32 v) |
Returns true if v is not equal to zero. More... | |
bool | mi::math::any (Sint64 v) |
Returns true if v is not equal to zero. More... | |
bool | mi::math::any (Float32 v) |
Returns true if v is not equal to zero. More... | |
bool | mi::math::any (Float64 v) |
Returns true if v is not equal to zero. More... | |
Float32 | mi::math::asin (Float32 s) |
Returns the arc sine of s in radians. More... | |
Float64 | mi::math::asin (Float64 s) |
Returns the arc sine of s in radians. More... | |
Float32 | mi::math::atan (Float32 s) |
Returns the arc tangent of s . More... | |
Float64 | mi::math::atan (Float64 s) |
Returns the arc tangent of s . More... | |
Float32 | mi::math::atan2 (Float32 s, Float32 t) |
Returns the arc tangent of s / t . More... | |
Float64 | mi::math::atan2 (Float64 s, Float64 t) |
Returns the arc tangent of s / t . More... | |
Float32 | mi::math::ceil (Float32 s) |
Returns the smallest integral value that is not less than s . More... | |
Float64 | mi::math::ceil (Float64 s) |
Returns the smallest integral value that is not less than s . More... | |
Uint8 | mi::math::clamp (Uint8 s, Uint8 low, Uint8 high) |
Returns the value s if it is in the range [low , high ], the value low if s < low , or the value high if s > high . More... | |
Uint16 | mi::math::clamp (Uint16 s, Uint16 low, Uint16 high) |
Returns the value s if it is in the range [low , high ], the value low if s < low , or the value high if s > high . More... | |
Uint32 | mi::math::clamp (Uint32 s, Uint32 low, Uint32 high) |
Returns the value s if it is in the range [low , high ], the value low if s < low , or the value high if s > high . More... | |
Uint64 | mi::math::clamp (Uint64 s, Uint64 low, Uint64 high) |
Returns the value s if it is in the range [low , high ], the value low if s < low , or the value high if s > high . More... | |
Sint8 | mi::math::clamp (Sint8 s, Sint8 low, Sint8 high) |
Returns the value s if it is in the range [low , high ], the value low if s < low , or the value high if s > high . More... | |
Sint16 | mi::math::clamp (Sint16 s, Sint16 low, Sint16 high) |
Returns the value s if it is in the range [low , high ], the value low if s < low , or the value high if s > high . More... | |
Sint32 | mi::math::clamp (Sint32 s, Sint32 low, Sint32 high) |
Returns the value s if it is in the range [low , high ], the value low if s < low , or the value high if s > high . More... | |
Sint64 | mi::math::clamp (Sint64 s, Sint64 low, Sint64 high) |
Returns the value s if it is in the range [low , high ], the value low if s < low , or the value high if s > high . More... | |
Float32 | mi::math::clamp (Float32 s, Float32 low, Float32 high) |
Returns the value s if it is in the range [low , high ], the value low if s < low , or the value high if s > high . More... | |
Float64 | mi::math::clamp (Float64 s, Float64 low, Float64 high) |
Returns the value s if it is in the range [low , high ], the value low if s < low , or the value high if s > high . More... | |
Float32 | mi::math::cos (Float32 a) |
Returns the cosine of a . The angle a is specified in radians. More... | |
Float64 | mi::math::cos (Float64 a) |
Returns the cosine of a . The angle a is specified in radians. More... | |
Float32 | mi::math::degrees (Float32 r) |
Converts radians r to degrees. More... | |
Float64 | mi::math::degrees (Float64 r) |
Converts radians r to degrees. More... | |
Float32 | mi::math::exp2 (Float32 s) |
Returns the constant 2 to the power of s (exponential function). More... | |
Float64 | mi::math::exp2 (Float64 s) |
Returns the constant 2 to the power of s (exponential function). More... | |
Float32 | mi::math::floor (Float32 s) |
Returns the largest integral value that is not greater than s . More... | |
Float64 | mi::math::floor (Float64 s) |
Returns the largest integral value that is not greater than s . More... | |
Float32 | mi::math::fmod (Float32 a, Float32 b) |
Returns a modulo b , in other words, the remainder of a/b. More... | |
Float64 | mi::math::fmod (Float64 a, Float64 b) |
Returns a modulo b , in other words, the remainder of a/b. More... | |
Float32 | mi::math::frac (Float32 s) |
Returns the positive fractional part of s . More... | |
Float64 | mi::math::frac (Float64 s) |
Returns the positive fractional part of s . More... | |
bool | mi::math::is_approx_equal (Float32 left, Float32 right, Float32 e) |
Compares the two given values for equality within the given epsilon. More... | |
bool | mi::math::is_approx_equal (Float64 left, Float64 right, Float64 e) |
Compares the two given values for equality within the given epsilon. More... | |
Uint32 | mi::math::leading_zeros (Uint32 v) |
Returns the number of leading zeros of v , 32-bit version. More... | |
Uint32 | mi::math::leading_zeros (Uint64 v) |
Returns the number of leading zeros of v , 64-bit version. More... | |
Float32 | mi::math::lerp (Float32 s1, Float32 s2, Float32 t) |
Returns the linear interpolation between s1 and s2 , i.e., it returns (1-t) * s1 + t * s2 . More... | |
Float64 | mi::math::lerp (Float64 s1, Float64 s2, Float64 t) |
Returns the linear interpolation between s1 and s2 , i.e., it returns (1-t) * s1 + t * s2 . More... | |
Float32 | mi::math::log2 (Float32 s) |
Returns the base 2 logarithm of s . More... | |
Float64 | mi::math::log2 (Float64 s) |
Returns the base 2 logarithm of s . More... | |
Sint32 | mi::math::log2_int (const Uint32 v) |
Returns the integer log2 of v . More... | |
Sint32 | mi::math::log2_int (const Uint64 v) |
Returns the integer log2 of v . More... | |
Sint32 | mi::math::log2_int (const Float32 v) |
Returns the integer log2 of v . More... | |
Sint32 | mi::math::log2_int (const Float64 v) |
Returns the integer log2 of v . More... | |
template<typename Integer> | |
Sint32 | mi::math::log2_int_ceil (const Integer v) |
Returns the integer log2 of v , i.e., rounded up to the next integer. More... | |
Float32 | mi::math::log10 (Float32 s) |
Returns the base 10 logarithm of s . More... | |
Float64 | mi::math::log10 (Float64 s) |
Returns the base 10 logarithm of s . More... | |
Float32 | mi::math::modf (Float32 s, Float32 &i) |
Returns the fractional part of s and stores the integral part of s in i . More... | |
Float64 | mi::math::modf (Float64 s, Float64 &i) |
Returns the fractional part of s and stores the integral part of s in i . More... | |
Uint32 | mi::math::pow (Uint32 a, Uint32 b) |
Returns a to the power of b . More... | |
Uint64 | mi::math::pow (Uint64 a, Uint64 b) |
Returns a to the power of b . More... | |
Sint32 | mi::math::pow (Sint32 a, Sint32 b) |
Returns a to the power of b . More... | |
Sint64 | mi::math::pow (Sint64 a, Sint64 b) |
Returns a to the power of b . More... | |
Float32 | mi::math::pow (Float32 a, Float32 b) |
Returns a to the power of b . More... | |
Float64 | mi::math::pow (Float64 a, Float64 b) |
Returns a to the power of b . More... | |
Float32 | mi::math::radians (Float32 d) |
Converts degrees d to radians. More... | |
Float64 | mi::math::radians (Float64 d) |
Converts degrees d to radians. More... | |
Float32 | mi::math::round (Float32 s) |
Returns s rounded to the nearest integer value. More... | |
Float64 | mi::math::round (Float64 s) |
Returns s rounded to the nearest integer value. More... | |
Float32 | mi::math::rsqrt (Float32 s) |
Returns the reciprocal of the square root of s . More... | |
Float64 | mi::math::rsqrt (Float64 s) |
Returns the reciprocal of the square root of s . More... | |
Float32 | mi::math::saturate (Float32 s) |
Returns the value s clamped to the range [0,1]. More... | |
Float64 | mi::math::saturate (Float64 s) |
Returns the value s clamped to the range [0,1]. More... | |
Sint8 | mi::math::sign (Sint8 s) |
Returns -1 if s<0 , 0 if s==0 , and +1 if s>0 . More... | |
Sint16 | mi::math::sign (Sint16 s) |
Returns -1 if s<0 , 0 if s==0 , and +1 if s>0 . More... | |
Sint32 | mi::math::sign (Sint32 s) |
Returns -1 if s<0 , 0 if s==0 , and +1 if s>0 . More... | |
Sint64 | mi::math::sign (Sint64 s) |
Returns -1 if s<0 , 0 if s==0 , and +1 if s>0 . More... | |
Float32 | mi::math::sign (Float32 s) |
Returns -1 if s<0 , 0 if s==0 , and +1 if s>0 . More... | |
Float64 | mi::math::sign (Float64 s) |
Returns -1 if s<0 , 0 if s==0 , and +1 if s>0 . More... | |
bool | mi::math::sign_bit (Sint8 s) |
Returns true if s<0 and false if s>= 0. More... | |
bool | mi::math::sign_bit (Sint16 s) |
Returns true if s<0 and false if s>= 0. More... | |
bool | mi::math::sign_bit (Sint32 s) |
Returns true if s<0 and false if s>= 0. More... | |
bool | mi::math::sign_bit (Sint64 s) |
Returns true if s<0 and false if s>= 0. More... | |
bool | mi::math::sign_bit (Float32 s) |
Extracts the sign bit of a single-precision floating point number. More... | |
bool | mi::math::sign_bit (Float64 s) |
Extracts the sign bit of a double-precision floating point number. More... | |
bool | mi::math::isinfinite (const Float32 x) |
Checks a single-precision floating point number for "infinity". More... | |
bool | mi::math::isinfinite (const Float64 x) |
Checks a double-precision floating point number for "infinity". More... | |
Float32 | mi::math::sin (Float32 a) |
Returns the sine of a . The angle a is specified in radians. More... | |
Float64 | mi::math::sin (Float64 a) |
Returns the sine of a . The angle a is specified in radians. More... | |
void | mi::math::sincos (Float32 a, Float32 &s, Float32 &c) |
Computes the sine s and cosine c of angle a simultaneously. More... | |
void | mi::math::sincos (Float64 a, Float64 &s, Float64 &c) |
Computes the sine s and cosine c of angle a simultaneously. More... | |
Float32 | mi::math::smoothstep (Float32 a, Float32 b, Float32 x) |
Returns 0 if x is less than a and 1 if x is greater than b . More... | |
Float64 | mi::math::smoothstep (Float64 a, Float64 b, Float64 x) |
Returns 0 if x is less than a and 1 if x is greater than b . More... | |
Float32 | mi::math::sqrt (Float32 s) |
Returns the square root of s . More... | |
Float64 | mi::math::sqrt (Float64 s) |
Returns the square root of s . More... | |
Float32 | mi::math::step (Float32 a, Float32 x) |
Returns 0 if x is less than a and 1 otherwise. More... | |
Float64 | mi::math::step (Float64 a, Float64 x) |
Returns 0 if x is less than a and 1 otherwise. More... | |
Float32 | mi::math::tan (Float32 a) |
Returns the tangent of a . The angle a is specified in radians. More... | |
Float64 | mi::math::tan (Float64 a) |
Returns the tangent of a . The angle a is specified in radians. More... | |
MI_HOST_DEVICE_INLINE void | mi::math::to_rgbe (const Float32 color[3], Uint32 &rgbe) |
Encodes a color into RGBE representation. More... | |
MI_HOST_DEVICE_INLINE void | mi::math::to_rgbe (const Float32 color[3], Uint8 rgbe[4]) |
Encodes a color into RGBE representation. More... | |
MI_HOST_DEVICE_INLINE void | mi::math::from_rgbe (const Uint8 rgbe[4], Float32 color[3]) |
Decodes a color from RGBE representation. More... | |
MI_HOST_DEVICE_INLINE void | mi::math::from_rgbe (const Uint32 rgbe, Float32 color[3]) |
Decodes a color from RGBE representation. More... | |
Sint32 | mi::math::dot (Sint32 a, Sint32 b) |
Returns the inner product (a.k.a. dot or scalar product) of two integers. More... | |
Float32 | mi::math::dot (Float32 a, Float32 b) |
Returns the inner product (a.k.a. dot or scalar product) of two scalars. More... | |
Float64 | mi::math::dot (Float64 a, Float64 b) |
Returns the inner product (a.k.a. dot or scalar product) of two scalars. More... | |
template<class V> | |
V::value_type | mi::math::dot (const V &lhs, const V &rhs) |
Returns the inner product (a.k.a. dot or scalar product) of two vectors. More... | |
template<class V> | |
V::value_type | mi::math::square_length (const V &v) |
Returns the squared Euclidean norm of the vector v . More... | |
Float32 | mi::math::length (Float32 a) |
Returns the Euclidean norm of the scalar a (its absolute value). More... | |
Float64 | mi::math::length (Float64 a) |
Returns the Euclidean norm of the scalar a (its absolute value). More... | |
template<class V> | |
V::value_type | mi::math::length (const V &v) |
Returns the Euclidean norm of the vector v . More... | |
template<class V> | |
V::value_type | mi::math::square_euclidean_distance (const V &lhs, const V &rhs) |
Returns the squared Euclidean distance from the vector lhs to the vector rhs . More... | |
template<class V> | |
V::value_type | mi::math::euclidean_distance (const V &lhs, const V &rhs) |
Returns the Euclidean distance from the vector lhs to the vector rhs . More... | |
template<class V> | |
void | mi::math::set_bounds (V &v, const V &low, const V &high) |
Bounds the value of vector v elementwise to the given low and high vector values. More... | |
template<class V> | |
bool | mi::math::is_equal (const V &lhs, const V &rhs) |
Returns true if vector lhs is elementwise equal to vector rhs , and false otherwise. More... | |
template<class V> | |
bool | mi::math::is_not_equal (const V &lhs, const V &rhs) |
Returns true if vector lhs is elementwise not equal to vector rhs , and false otherwise. More... | |
template<class V> | |
bool | mi::math::lexicographically_less (const V &lhs, const V &rhs) |
Returns true if vector lhs is lexicographically less than vector rhs , and false otherwise. More... | |
template<class V> | |
bool | mi::math::lexicographically_less_or_equal (const V &lhs, const V &rhs) |
Returns true if vector lhs is lexicographically less than or equal to vector rhs , and false otherwise. More... | |
template<class V> | |
bool | mi::math::lexicographically_greater (const V &lhs, const V &rhs) |
Returns true if vector lhs is lexicographically greater than vector rhs , and false otherwise. More... | |
template<class V> | |
bool | mi::math::lexicographically_greater_or_equal (const V &lhs, const V &rhs) |
Returns true if vector lhs is lexicographically greater than or equal to vector rhs , and false otherwise. More... | |
template<class V> | |
Comparison_result | mi::math::lexicographically_compare (const V &lhs, const V &rhs) |
Compares two vectors lexicographically. More... | |
Fast approximations for math functions on limited precision floats.
#include <mi/math/function.h>
|
inline |
Returns true
if v
is not equal to zero.
|
inline |
Returns true
if v
is not equal to zero.
|
inline |
Returns true
if v
is not equal to zero.
|
inline |
Returns true
if v
is not equal to zero.
|
inline |
Returns true
if v
is not equal to zero.
|
inline |
Returns true
if v
is not equal to zero.
|
inline |
Returns true
if v
is not equal to zero.
|
inline |
Returns true
if v
is not equal to zero.
|
inline |
Returns true
if v
is not equal to zero.
|
inline |
Returns true
if v
is not equal to zero.
|
inline |
Returns true
if v
is not equal to zero.
|
inline |
Returns true
if v
is not equal to zero.
|
inline |
Returns true
if v
is not equal to zero.
|
inline |
Returns true
if v
is not equal to zero.
|
inline |
Returns true
if v
is not equal to zero.
|
inline |
Returns true
if v
is not equal to zero.
|
inline |
Returns true
if v
is not equal to zero.
|
inline |
Returns true
if v
is not equal to zero.
|
inline |
Returns true
if v
is not equal to zero.
|
inline |
Returns true
if v
is not equal to zero.
Returns the arc tangent of s
/ t
.
The signs of s
and t
are used to determine the quadrant of the results.
Returns the arc tangent of s
/ t
.
The signs of s
and t
are used to determine the quadrant of the results.
Returns the smallest integral value that is not less than s
.
Returns the smallest integral value that is not less than s
.
Returns the value s
if it is in the range [low
, high
], the value low
if s
< low
, or the value high
if s
> high
.
Returns the value s
if it is in the range [low
, high
], the value low
if s
< low
, or the value high
if s
> high
.
Returns the value s
if it is in the range [low
, high
], the value low
if s
< low
, or the value high
if s
> high
.
Returns the value s
if it is in the range [low
, high
], the value low
if s
< low
, or the value high
if s
> high
.
Returns the value s
if it is in the range [low
, high
], the value low
if s
< low
, or the value high
if s
> high
.
Returns the value s
if it is in the range [low
, high
], the value low
if s
< low
, or the value high
if s
> high
.
Returns the value s
if it is in the range [low
, high
], the value low
if s
< low
, or the value high
if s
> high
.
Returns the value s
if it is in the range [low
, high
], the value low
if s
< low
, or the value high
if s
> high
.
Returns the value s
if it is in the range [low
, high
], the value low
if s
< low
, or the value high
if s
> high
.
Returns the value s
if it is in the range [low
, high
], the value low
if s
< low
, or the value high
if s
> high
.
Returns the cosine of a
. The angle a
is specified in radians.
Returns the cosine of a
. The angle a
is specified in radians.
|
inline |
Returns the inner product (a.k.a. dot or scalar product) of two vectors.
Returns the inner product (a.k.a. dot or scalar product) of two scalars.
Returns the inner product (a.k.a. dot or scalar product) of two scalars.
Returns the inner product (a.k.a. dot or scalar product) of two integers.
|
inline |
Returns the Euclidean distance from the vector lhs
to the vector rhs
.
Uses an unqualified call to sqrt(...)
on the vector element type.
Returns the constant 2
to the power of s
(exponential function).
Returns the constant 2
to the power of s
(exponential function).
A fast implementation of pow(x,y) for floats.
b | base |
e | exponent |
Returns the largest integral value that is not greater than s
.
Returns the largest integral value that is not greater than s
.
Returns a
modulo b
, in other words, the remainder of a/b.
The result has the same sign as a
.
Returns a
modulo b
, in other words, the remainder of a/b.
The result has the same sign as a
.
Decodes a color from RGBE representation.
Decodes a color from RGBE representation.
Compares the two given values for equality within the given epsilon.
Compares the two given values for equality within the given epsilon.
|
inline |
Returns true
if vector lhs
is elementwise equal to vector rhs
, and false
otherwise.
|
inline |
Returns true
if vector lhs
is elementwise not equal to vector rhs
, and false
otherwise.
|
inline |
Checks a single-precision floating point number for "infinity".
The methods relies on the IEEE 754 floating-point standard.
|
inline |
Checks a double-precision floating point number for "infinity".
The methods relies on the IEEE 754 floating-point standard.
Returns the number of leading zeros of v
, 32-bit version.
Returns the number of leading zeros of v
, 64-bit version.
|
inline |
Returns the Euclidean norm of the vector v
.
Uses an unqualified call to sqrt(...)
on the vector element type.
Returns the Euclidean norm of the scalar a
(its absolute value).
Returns the Euclidean norm of the scalar a
(its absolute value).
Returns the linear interpolation between s1
and s2
, i.e., it returns (1-t) * s1 + t * s2
.
s1 | one scalar |
s2 | second scalar |
t | interpolation parameter in [0,1] |
Returns the linear interpolation between s1
and s2
, i.e., it returns (1-t) * s1 + t * s2
.
s1 | one scalar |
s2 | second scalar |
t | interpolation parameter in [0,1] |
|
inline |
Compares two vectors lexicographically.
Returns LESS
if lhs
is less than rhs
, and correspondingly EQUAL
or GREATER
for the other cases.
lhs
or rhs
contains NaNs.
|
inline |
Returns true
if vector lhs
is lexicographically greater than vector rhs
, and false
otherwise.
|
inline |
Returns true
if vector lhs
is lexicographically greater than or equal to vector rhs
, and false
otherwise.
|
inline |
Returns true
if vector lhs
is lexicographically less than vector rhs
, and false
otherwise.
|
inline |
Returns true
if vector lhs
is lexicographically less than or equal to vector rhs
, and false
otherwise.
|
inline |
Returns the integer log2 of v
, i.e., rounded up to the next integer.
Returns the fractional part of s
and stores the integral part of s
in i
.
Both parts have the same sign as s
.
Returns the fractional part of s
and stores the integral part of s
in i
.
Both parts have the same sign as s
.
|
inline |
Bounds the value of vector v
elementwise to the given low
and high
vector values.
|
inline |
Extracts the sign bit of a single-precision floating point number.
The methods relies on the IEEE 754 floating-point standard. Note that the sign bit is set for the special floating-point value -0.0f, so this function returns true
for this value.
|
inline |
Extracts the sign bit of a double-precision floating point number.
The methods relies on the IEEE 754 floating-point standard. Note that the sign bit is set for the special floating-point value -0.0f, so this function returns true
for this value.
|
inline |
Returns true
if s<0
and false
if s>=
0.
|
inline |
Returns true
if s<0
and false
if s>=
0.
|
inline |
Returns true
if s<0
and false
if s>=
0.
|
inline |
Returns true
if s<0
and false
if s>=
0.
Returns the sine of a
. The angle a
is specified in radians.
Returns the sine of a
. The angle a
is specified in radians.
Computes the sine s
and cosine c
of angle a
simultaneously.
The angle a
is specified in radians.
Computes the sine s
and cosine c
of angle a
simultaneously.
The angle a
is specified in radians.
Returns 0 if x
is less than a
and 1 if x
is greater than b
.
A smooth curve is applied in-between so that the return value varies continuously from 0 to 1 as x
varies from a
to b
.
Returns 0 if x
is less than a
and 1 if x
is greater than b
.
A smooth curve is applied in-between so that the return value varies continuously from 0 to 1 as x
varies from a
to b
.
|
inline |
Returns the squared Euclidean distance from the vector lhs
to the vector rhs
.
|
inline |
Returns the squared Euclidean norm of the vector v
.
Returns 0 if x
is less than a
and 1 otherwise.
Returns 0 if x
is less than a
and 1 otherwise.
Returns the tangent of a
. The angle a
is specified in radians.
Returns the tangent of a
. The angle a
is specified in radians.
Encodes a color into RGBE representation.