diff --git a/crates/spirv-std/src/math_ext.rs b/crates/spirv-std/src/math_ext.rs index c5b5495d9d..bab8afdefa 100644 --- a/crates/spirv-std/src/math_ext.rs +++ b/crates/spirv-std/src/math_ext.rs @@ -78,7 +78,7 @@ impl MathExt for f32 { } fn fract(self) -> f32 { - self - self.trunc() + self - self.floor() } fn signum(self) -> f32 {