Skip to content
This repository has been archived by the owner on Jan 29, 2025. It is now read-only.

Commit

Permalink
update doc of clamp fn
Browse files Browse the repository at this point in the history
  • Loading branch information
teoxoy authored and kvark committed Apr 16, 2022
1 parent 3308586 commit c942a90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/front/glsl/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,9 +599,9 @@ fn glsl_float_min(x: f64, y: f64) -> f64 {

/// Helper function to implement the GLSL `clamp` function for floats.
///
/// While Rust does provide a `f64::clamp` method, it requires a version of rust
/// above our MSRV and it also panics if either `min` or `max` are `NaN`s which
/// is not the behavior specified by the glsl specification.
/// While Rust does provide a `f64::clamp` method, it panics if either
/// `min` or `max` are `NaN`s which is not the behavior specified by
/// the glsl specification.
fn glsl_float_clamp(value: f64, min: f64, max: f64) -> f64 {
glsl_float_min(glsl_float_max(value, min), max)
}
Expand Down

0 comments on commit c942a90

Please sign in to comment.