Closed TianyiShi2001 closed 4 years ago
I'll add more syntax chages, for example:
let (r, g, b, a) = {
let p = &pixels[CHANNELS * pos..][..CHANNELS];
(p[0] as f64, p[1] as f64, p[2] as f64, p[3] as f64)
will probably become p.chunks_exact()
.
But these will be in another PR. The topic of this PR is just to unite with image::math::nq
Unify
image::math::nq
. See: https://github.com/image-rs/image/issues/1338Summary:
lookup
fromimage::math::nq
is addedimage::math::nq
image::math::nq
usedf64::from(<some i32 value>)
andi32::from(<some u8 value>)
, but these conversions cannot be lossy, so I kept them as.. as f64
and.. as i32