diff --git a/codegen/templates/vec.rs.tera b/codegen/templates/vec.rs.tera index b1a79a72..6d7abbf3 100644 --- a/codegen/templates/vec.rs.tera +++ b/codegen/templates/vec.rs.tera @@ -801,9 +801,15 @@ impl {{ self_t }} { /// Returns a vector with elements representing the sign of `self`. /// + {% if is_float -%} /// - `1.0` if the number is positive, `+0.0` or `INFINITY` /// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` /// - `NAN` if the number is `NAN` + {%- else -%} + /// - `0` if the number is zero + /// - `1` if the number is positive + /// - `-1` if the number is negative + {%- endif %} #[inline] pub fn signum(self) -> Self { {% if is_scalar %} diff --git a/src/i32/ivec2.rs b/src/i32/ivec2.rs index 3748b1c4..0a783052 100644 --- a/src/i32/ivec2.rs +++ b/src/i32/ivec2.rs @@ -247,9 +247,9 @@ impl IVec2 { /// Returns a vector with elements representing the sign of `self`. /// - /// - `1.0` if the number is positive, `+0.0` or `INFINITY` - /// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` - /// - `NAN` if the number is `NAN` + /// - `0` if the number is zero + /// - `1` if the number is positive + /// - `-1` if the number is negative #[inline] pub fn signum(self) -> Self { Self { diff --git a/src/i32/ivec3.rs b/src/i32/ivec3.rs index ee993b75..2f71ac01 100644 --- a/src/i32/ivec3.rs +++ b/src/i32/ivec3.rs @@ -288,9 +288,9 @@ impl IVec3 { /// Returns a vector with elements representing the sign of `self`. /// - /// - `1.0` if the number is positive, `+0.0` or `INFINITY` - /// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` - /// - `NAN` if the number is `NAN` + /// - `0` if the number is zero + /// - `1` if the number is positive + /// - `-1` if the number is negative #[inline] pub fn signum(self) -> Self { Self { diff --git a/src/i32/ivec4.rs b/src/i32/ivec4.rs index 3912ee7b..7c076210 100644 --- a/src/i32/ivec4.rs +++ b/src/i32/ivec4.rs @@ -312,9 +312,9 @@ impl IVec4 { /// Returns a vector with elements representing the sign of `self`. /// - /// - `1.0` if the number is positive, `+0.0` or `INFINITY` - /// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` - /// - `NAN` if the number is `NAN` + /// - `0` if the number is zero + /// - `1` if the number is positive + /// - `-1` if the number is negative #[inline] pub fn signum(self) -> Self { Self {