[−][src]Module cichlid::math
Collection of math Traits and functions for manipulating integers.
Some including functions:
- Scaling Functions (from one integer to another)
- In place and batch scaling (
nscale16x3
for example). - Dimming and Brightening Functions
- Fast u8 and u16 trigonometric functions
- Other useful operations, such as blending integers.
This module offers a couple different ways to access the m
These are the raw functions for both u8
and u16
. Most of these methods
are implemented through the Scaling
trait interface, see that for better
documentation of these functions.
If const
functions are desired, use the re-exported functions rather than
the trait impls.
Traits
ScalingInt | Scaling, Dimming, Brightening, and other misc functions functions for integers representing scalar components. |
Trig | Basic trigonometric functions for integers. |
Functions
blend_u8 | Blends a |
blend_u16 | Blends a |
brighten_u8_lin | Brightens a |
brighten_u8_raw | Brightens a |
brighten_u8_video | Brightens a |
brighten_u16_lin | Brightens a |
brighten_u16_raw | Brightens a |
brighten_u16_video | Brightens a |
cos_u8 | Returns the cosine of a single byte integer. |
cos_u16 | Returns the cosine of a two byte integer. |
dim_u8_lin | Dims a |
dim_u8_raw | Dims a |
dim_u8_video | Dims a |
dim_u16_lin | Dims a |
dim_u16_raw | Dims a |
dim_u16_video | Dims a |
nscale_u8 | Scales a single |
nscale_u16 | Scales a single |
nscale_u16x2 | Inplace scaling for two |
nscale_u16x3 | Inplace scaling for three |
nscale_u16x4 | Inplace scaling for four |
nscale_u8x2 | Inplace scaling for two |
nscale_u8x3 | Inplace scaling for three |
nscale_u8x4 | Inplace scaling for four |
scale_u8 | Scale a |
scale_u8_video | Scale a |
scale_u16 | Scale a |
scale_u16_video | Scale a |
sin_u8 | Returns the sine of a single byte integer. |
sin_u16 | Returns the sine of a two byte integer. |