Add RGB and interpolation traits.

This commit is contained in:
Overlord committed 2026-10-18 15:27:27 +02:00
1 parent b39daa61c2
commit 635e212daa
10 files changed
+340

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
use super::Rgb;
use crate::smooth::Lerp;
#[derive(Debug, Clone, Copy, PartialEq, Default)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct LinearRgb {
pub r: f32,
pub g: f32,
pub b: f32,
}
impl LinearRgb
{
pub fn to_rgb(self) -> Rgb { todo!() }
pub fn luminance(self) -> f32 { todo!() }
}
impl Lerp for LinearRgb
{
fn lerp(&self, _to: &Self, _t: f32) -> Self { todo!() }
}