Skip to content

Commit

Permalink
Run codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
bitshifter committed Mar 31, 2024
1 parent f1e5f0f commit 28eb887
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/f32/scalar/vec4a.rs
Expand Up @@ -729,13 +729,27 @@ impl Vec4A {
}
}

/// Returns a vector containing the fractional part of the vector, e.g. `self -
/// self.floor()`.
/// Returns a vector containing the fractional part of the vector as `self - self.trunc()`.
///
/// Note that this differs from the GLSL implementation of `fract` which returns
/// `self - self.floor()`.
///
/// Note that this is fast but not precise for large numbers.
#[inline]
#[must_use]
pub fn fract(self) -> Self {
self - self.trunc()
}

/// Returns a vector containing the fractional part of the vector as `self - self.floor()`.
///
/// Note that this differs from the Rust implementation of `fract` which returns
/// `self - self.trunc()`.
///
/// Note that this is fast but not precise for large numbers.
#[inline]
#[must_use]
pub fn fract_gl(self) -> Self {
self - self.floor()
}

Expand Down

0 comments on commit 28eb887

Please sign in to comment.