devela/media/color/rgb/impls/
f64.rs

1// devela::media::color::rgb::impls::f64
2
3#![expect(unused)]
4
5use super::*;
6use crate::{Rgb8, Rgba8};
7#[cfg(feature = "_float_f32")]
8use crate::{RgbF32, RgbaF32};
9use crate::{RgbF64, RgbaF64};
10
11#[allow(missing_docs)]
12#[rustfmt::skip]
13impl RgbF64 {
14    /// New `RgbF64`.
15    pub const fn new(r: f64, g: f64, b: f64) -> RgbF64 { Self { c: [r, g, b] } }
16    /// The red component.
17    pub const fn red(self) -> f64 { self.c[0] }
18    pub const fn r(self) -> f64 { self.c[0] }
19    /// The green component.
20    pub const fn green(self) -> f64 { self.c[1] }
21    pub const fn g(self) -> f64 { self.c[1] }
22    /// The blue component.
23    pub const fn blue(self) -> f64 { self.c[2] }
24    pub const fn b(self) -> f64 { self.c[2] }
25}