We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e139854 commit a02481aCopy full SHA for a02481a
src/lib.rs
@@ -1329,10 +1329,11 @@ pub fn cielab_to_xyz<T: DType, const N: usize>(pixel: &mut [T; N])
1329
where
1330
Channels<N>: ValidChannels,
1331
{
1332
+ pixel[0] = pixel[0].fma((1.0 / 116.0).to_dt(), (16.0 / 116.0).to_dt());
1333
[pixel[0], pixel[1], pixel[2]] = [
- (pixel[0] + 16.0.to_dt()) / 116.0.to_dt() + pixel[1] / 500.0.to_dt(),
1334
- (pixel[0] + 16.0.to_dt()) / 116.0.to_dt(),
1335
- (pixel[0] + 16.0.to_dt()) / 116.0.to_dt() - pixel[2] / 200.0.to_dt(),
+ pixel[0] + pixel[1] / 500.0.to_dt(),
+ pixel[0],
1336
+ pixel[0] - pixel[2] / 200.0.to_dt(),
1337
];
1338
1339
pixel.iter_mut().take(3).for_each(|c| {
0 commit comments