This commit is contained in:
Nicolas 2022-04-03 14:52:20 +02:00
parent 857b7bc71f
commit 243a01a638

View File

@ -13,4 +13,17 @@ impl FillMode for LevelFillMode {
fn sample(&self, level: f32, _: Vector) -> f32 { fn sample(&self, level: f32, _: Vector) -> f32 {
level level
} }
}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn sample() {
let mode = LevelFillMode::new();
assert_eq!(0.3, mode.sample(0.3, Vector::ZERO));
assert_eq!(0.7, mode.sample(0.7, Vector::new(0.1, 0.2)));
}
} }