Revert from_rgb to const
This commit is contained in:
parent
4009f0cf73
commit
bb44398819
@ -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…
x
Reference in New Issue
Block a user