Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
106: Add Extended Conversion Trait r=Ogeon a=Veykril This commit tries to implement a conversion trait similar to the one mentioned in #41 mimicking the `From`/`Into` traits of the `std` library. `convert_*` clamps the resulting color to its color space limitations. `convert_unclamped_*` simply converts the color. `try_convert_*` converts the color and returns it in a `Result` depending on it being valid or not. Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
- Loading branch information
Showing
2 changed files
with
169 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters