Revert from_rgb to const
This commit is contained in:
parent
4009f0cf73
commit
bb44398819
1 changed files with 2 additions and 2 deletions
|
|
@ -52,8 +52,8 @@ impl Color {
|
||||||
/// Creates a [`Color`] from its RGB components.
|
/// Creates a [`Color`] from its RGB components.
|
||||||
///
|
///
|
||||||
/// [`Color`]: struct.Color.html
|
/// [`Color`]: struct.Color.html
|
||||||
pub fn from_rgb(r: f32, g: f32, b: f32) -> Color {
|
pub const fn from_rgb(r: f32, g: f32, b: f32) -> Color {
|
||||||
Color::new(r, g, b, 1.0)
|
Color { r, g, b, a: 1.0 }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a [`Color`] from its RGB8 components.
|
/// Creates a [`Color`] from its RGB8 components.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue