Expand description
Type definitions of Float and Spectrum, otherwise constants and functions which can be used almost everywhere else in the code.
Constants
Functions
Use unsafe std::mem::transmute_copy to convert u32 to f32.
Clamp the given value val to lie between the values low and high.
Convert from angles expressed in radians to degrees.
Helper function which emulates the behavior of std::upper_bound().
Use unsafe std::mem::transmute_copy to convert f32 to u32.
Error propagation.
Is used to write sRGB-compatible 8-bit image files.
Determine if a given integer is an exact power of 2.
Interpolate linearly between two provided values.
Compute an integer base-2 logarithm function.
Compute an integer base-2 logarithm function.
Compute an integer base-2 logarithm function.
Compute an integer base-2 logarithm function.
Computes the remainder of a/b. Provides the behavior that the modulus of a negative number is always positive.
Bump a floating-point value down to the next smaller representable floating-point value.
Bump a floating-point value up to the next greater representable floating-point value.
Find solution(s) of the quadratic equation at2 + bt + c = 0.
Convert from angles expressed in degrees to radians.
Round an integer up to the next higher (or equal) power of 2.
Round an integer up to the next higher (or equal) power of 2.