Repository: bitshifter/glam-rs
Pull request #403 (2023-05-09 20:46:32)

Add MIN, MAX, INFINITY & NEG_INFINITY vector constants.


Patch:
diff --git a/codegen/templates/vec.rs.tera b/codegen/templates/vec.rs.tera
index 8cad9a9..fef4ccd 100644
--- a/codegen/templates/vec.rs.tera
+++ b/codegen/templates/vec.rs.tera
@@ -228,9 +228,21 @@ impl {{ self_t }} {
     pub const NEG_ONE: Self = Self::splat(-{{ one }});
 {% endif %}
 
+    /// All `{{ scalar_t }}::MIN`.
+    pub const MIN: Self = Self::splat({{ scalar_t }}::MIN);
+
+    /// All `{{ scalar_t }}::MAX`.
+    pub const MAX: Self = Self::splat({{ scalar_t }}::MAX);
+
 {% if is_float %}
-    /// All NAN.
+    /// All `{{ scalar_t }}::NAN`.
     pub const NAN: Self = Self::splat({{ scalar_t }}::NAN);
+
+    /// All `{{ scalar_t }}::INFINITY`.
+    pub const INFINITY: Self = Self::splat({{ scalar_t }}::INFINITY);
+
+    /// All `{{ scalar_t }}::NEG_INFINITY`.
+    pub const NEG_INFINITY: Self = Self::splat({{ scalar_t }}::NEG_INFINITY);
 {% endif %}
 
 {% for i in range(end = dim) %}
diff --git a/src/f32/coresimd/vec3a.rs b/src/f32/coresimd/vec3a.rs
index 3f21e80..648a5cc 100644
--- a/src/f32/coresimd/vec3a.rs
+++ b/src/f32/coresimd/vec3a.rs
@@ -39,9 +39,21 @@ impl Vec3A {
     /// All negative ones.
     pub const NEG_ONE: Self = Self::splat(-1.0);
 
-    /// All NAN.
+    /// All `f32::MIN`.
+    pub const MIN: Self = Self::splat(f32::MIN);
+
+    /// All `f32::MAX`.
+    pub const MAX: Self = Self::splat(f32::MAX);
+
+    /// All `f32::NAN`.
     pub const NAN: Self = Self::splat(f32::NAN);
 
+    /// All `f32::INFINITY`.
+    pub const INFINITY: Self = Self::splat(f32::INFINITY);
+
+    /// All `f32::NEG_INFINITY`.
+    pub const NEG_INFINITY: Self = Self::splat(f32::NEG_INFINITY);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1.0, 0.0, 0.0);
 
diff --git a/src/f32/coresimd/vec4.rs b/src/f32/coresimd/vec4.rs
index 70e650e..fed9a92 100644
--- a/src/f32/coresimd/vec4.rs
+++ b/src/f32/coresimd/vec4.rs
@@ -35,9 +35,21 @@ impl Vec4 {
     /// All negative ones.
     pub const NEG_ONE: Self = Self::splat(-1.0);
 
-    /// All NAN.
+    /// All `f32::MIN`.
+    pub const MIN: Self = Self::splat(f32::MIN);
+
+    /// All `f32::MAX`.
+    pub const MAX: Self = Self::splat(f32::MAX);
+
+    /// All `f32::NAN`.
     pub const NAN: Self = Self::splat(f32::NAN);
 
+    /// All `f32::INFINITY`.
+    pub const INFINITY: Self = Self::splat(f32::INFINITY);
+
+    /// All `f32::NEG_INFINITY`.
+    pub const NEG_INFINITY: Self = Self::splat(f32::NEG_INFINITY);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1.0, 0.0, 0.0, 0.0);
 
diff --git a/src/f32/scalar/vec3a.rs b/src/f32/scalar/vec3a.rs
index 6719248..b1e0ca2 100644
--- a/src/f32/scalar/vec3a.rs
+++ b/src/f32/scalar/vec3a.rs
@@ -42,9 +42,21 @@ impl Vec3A {
     /// All negative ones.
     pub const NEG_ONE: Self = Self::splat(-1.0);
 
-    /// All NAN.
+    /// All `f32::MIN`.
+    pub const MIN: Self = Self::splat(f32::MIN);
+
+    /// All `f32::MAX`.
+    pub const MAX: Self = Self::splat(f32::MAX);
+
+    /// All `f32::NAN`.
     pub const NAN: Self = Self::splat(f32::NAN);
 
+    /// All `f32::INFINITY`.
+    pub const INFINITY: Self = Self::splat(f32::INFINITY);
+
+    /// All `f32::NEG_INFINITY`.
+    pub const NEG_INFINITY: Self = Self::splat(f32::NEG_INFINITY);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1.0, 0.0, 0.0);
 
diff --git a/src/f32/scalar/vec4.rs b/src/f32/scalar/vec4.rs
index 53c80b1..adca7a5 100644
--- a/src/f32/scalar/vec4.rs
+++ b/src/f32/scalar/vec4.rs
@@ -41,9 +41,21 @@ impl Vec4 {
     /// All negative ones.
     pub const NEG_ONE: Self = Self::splat(-1.0);
 
-    /// All NAN.
+    /// All `f32::MIN`.
+    pub const MIN: Self = Self::splat(f32::MIN);
+
+    /// All `f32::MAX`.
+    pub const MAX: Self = Self::splat(f32::MAX);
+
+    /// All `f32::NAN`.
     pub const NAN: Self = Self::splat(f32::NAN);
 
+    /// All `f32::INFINITY`.
+    pub const INFINITY: Self = Self::splat(f32::INFINITY);
+
+    /// All `f32::NEG_INFINITY`.
+    pub const NEG_INFINITY: Self = Self::splat(f32::NEG_INFINITY);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1.0, 0.0, 0.0, 0.0);
 
diff --git a/src/f32/sse2/vec3a.rs b/src/f32/sse2/vec3a.rs
index ba29883..b6e0ffd 100644
--- a/src/f32/sse2/vec3a.rs
+++ b/src/f32/sse2/vec3a.rs
@@ -47,9 +47,21 @@ impl Vec3A {
     /// All negative ones.
     pub const NEG_ONE: Self = Self::splat(-1.0);
 
-    /// All NAN.
+    /// All `f32::MIN`.
+    pub const MIN: Self = Self::splat(f32::MIN);
+
+    /// All `f32::MAX`.
+    pub const MAX: Self = Self::splat(f32::MAX);
+
+    /// All `f32::NAN`.
     pub const NAN: Self = Self::splat(f32::NAN);
 
+    /// All `f32::INFINITY`.
+    pub const INFINITY: Self = Self::splat(f32::INFINITY);
+
+    /// All `f32::NEG_INFINITY`.
+    pub const NEG_INFINITY: Self = Self::splat(f32::NEG_INFINITY);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1.0, 0.0, 0.0);
 
diff --git a/src/f32/sse2/vec4.rs b/src/f32/sse2/vec4.rs
index bf90c5f..c060638 100644
--- a/src/f32/sse2/vec4.rs
+++ b/src/f32/sse2/vec4.rs
@@ -43,9 +43,21 @@ impl Vec4 {
     /// All negative ones.
     pub const NEG_ONE: Self = Self::splat(-1.0);
 
-    /// All NAN.
+    /// All `f32::MIN`.
+    pub const MIN: Self = Self::splat(f32::MIN);
+
+    /// All `f32::MAX`.
+    pub const MAX: Self = Self::splat(f32::MAX);
+
+    /// All `f32::NAN`.
     pub const NAN: Self = Self::splat(f32::NAN);
 
+    /// All `f32::INFINITY`.
+    pub const INFINITY: Self = Self::splat(f32::INFINITY);
+
+    /// All `f32::NEG_INFINITY`.
+    pub const NEG_INFINITY: Self = Self::splat(f32::NEG_INFINITY);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1.0, 0.0, 0.0, 0.0);
 
diff --git a/src/f32/vec2.rs b/src/f32/vec2.rs
index cea970e..0e36223 100644
--- a/src/f32/vec2.rs
+++ b/src/f32/vec2.rs
@@ -33,9 +33,21 @@ impl Vec2 {
     /// All negative ones.
     pub const NEG_ONE: Self = Self::splat(-1.0);
 
-    /// All NAN.
+    /// All `f32::MIN`.
+    pub const MIN: Self = Self::splat(f32::MIN);
+
+    /// All `f32::MAX`.
+    pub const MAX: Self = Self::splat(f32::MAX);
+
+    /// All `f32::NAN`.
     pub const NAN: Self = Self::splat(f32::NAN);
 
+    /// All `f32::INFINITY`.
+    pub const INFINITY: Self = Self::splat(f32::INFINITY);
+
+    /// All `f32::NEG_INFINITY`.
+    pub const NEG_INFINITY: Self = Self::splat(f32::NEG_INFINITY);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1.0, 0.0);
 
diff --git a/src/f32/vec3.rs b/src/f32/vec3.rs
index 8474a5e..db241ec 100644
--- a/src/f32/vec3.rs
+++ b/src/f32/vec3.rs
@@ -33,9 +33,21 @@ impl Vec3 {
     /// All negative ones.
     pub const NEG_ONE: Self = Self::splat(-1.0);
 
-    /// All NAN.
+    /// All `f32::MIN`.
+    pub const MIN: Self = Self::splat(f32::MIN);
+
+    /// All `f32::MAX`.
+    pub const MAX: Self = Self::splat(f32::MAX);
+
+    /// All `f32::NAN`.
     pub const NAN: Self = Self::splat(f32::NAN);
 
+    /// All `f32::INFINITY`.
+    pub const INFINITY: Self = Self::splat(f32::INFINITY);
+
+    /// All `f32::NEG_INFINITY`.
+    pub const NEG_INFINITY: Self = Self::splat(f32::NEG_INFINITY);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1.0, 0.0, 0.0);
 
diff --git a/src/f32/wasm32/vec3a.rs b/src/f32/wasm32/vec3a.rs
index 236b836..db1a710 100644
--- a/src/f32/wasm32/vec3a.rs
+++ b/src/f32/wasm32/vec3a.rs
@@ -44,9 +44,21 @@ impl Vec3A {
     /// All negative ones.
     pub const NEG_ONE: Self = Self::splat(-1.0);
 
-    /// All NAN.
+    /// All `f32::MIN`.
+    pub const MIN: Self = Self::splat(f32::MIN);
+
+    /// All `f32::MAX`.
+    pub const MAX: Self = Self::splat(f32::MAX);
+
+    /// All `f32::NAN`.
     pub const NAN: Self = Self::splat(f32::NAN);
 
+    /// All `f32::INFINITY`.
+    pub const INFINITY: Self = Self::splat(f32::INFINITY);
+
+    /// All `f32::NEG_INFINITY`.
+    pub const NEG_INFINITY: Self = Self::splat(f32::NEG_INFINITY);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1.0, 0.0, 0.0);
 
diff --git a/src/f32/wasm32/vec4.rs b/src/f32/wasm32/vec4.rs
index dad21c5..a74bacd 100644
--- a/src/f32/wasm32/vec4.rs
+++ b/src/f32/wasm32/vec4.rs
@@ -40,9 +40,21 @@ impl Vec4 {
     /// All negative ones.
     pub const NEG_ONE: Self = Self::splat(-1.0);
 
-    /// All NAN.
+    /// All `f32::MIN`.
+    pub const MIN: Self = Self::splat(f32::MIN);
+
+    /// All `f32::MAX`.
+    pub const MAX: Self = Self::splat(f32::MAX);
+
+    /// All `f32::NAN`.
     pub const NAN: Self = Self::splat(f32::NAN);
 
+    /// All `f32::INFINITY`.
+    pub const INFINITY: Self = Self::splat(f32::INFINITY);
+
+    /// All `f32::NEG_INFINITY`.
+    pub const NEG_INFINITY: Self = Self::splat(f32::NEG_INFINITY);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1.0, 0.0, 0.0, 0.0);
 
diff --git a/src/f64/dvec2.rs b/src/f64/dvec2.rs
index 87fd2ec..b7b2903 100644
--- a/src/f64/dvec2.rs
+++ b/src/f64/dvec2.rs
@@ -33,9 +33,21 @@ impl DVec2 {
     /// All negative ones.
     pub const NEG_ONE: Self = Self::splat(-1.0);
 
-    /// All NAN.
+    /// All `f64::MIN`.
+    pub const MIN: Self = Self::splat(f64::MIN);
+
+    /// All `f64::MAX`.
+    pub const MAX: Self = Self::splat(f64::MAX);
+
+    /// All `f64::NAN`.
     pub const NAN: Self = Self::splat(f64::NAN);
 
+    /// All `f64::INFINITY`.
+    pub const INFINITY: Self = Self::splat(f64::INFINITY);
+
+    /// All `f64::NEG_INFINITY`.
+    pub const NEG_INFINITY: Self = Self::splat(f64::NEG_INFINITY);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1.0, 0.0);
 
diff --git a/src/f64/dvec3.rs b/src/f64/dvec3.rs
index cc54b62..b1f34d0 100644
--- a/src/f64/dvec3.rs
+++ b/src/f64/dvec3.rs
@@ -33,9 +33,21 @@ impl DVec3 {
     /// All negative ones.
     pub const NEG_ONE: Self = Self::splat(-1.0);
 
-    /// All NAN.
+    /// All `f64::MIN`.
+    pub const MIN: Self = Self::splat(f64::MIN);
+
+    /// All `f64::MAX`.
+    pub const MAX: Self = Self::splat(f64::MAX);
+
+    /// All `f64::NAN`.
     pub const NAN: Self = Self::splat(f64::NAN);
 
+    /// All `f64::INFINITY`.
+    pub const INFINITY: Self = Self::splat(f64::INFINITY);
+
+    /// All `f64::NEG_INFINITY`.
+    pub const NEG_INFINITY: Self = Self::splat(f64::NEG_INFINITY);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1.0, 0.0, 0.0);
 
diff --git a/src/f64/dvec4.rs b/src/f64/dvec4.rs
index a5bdae5..167cb2e 100644
--- a/src/f64/dvec4.rs
+++ b/src/f64/dvec4.rs
@@ -35,9 +35,21 @@ impl DVec4 {
     /// All negative ones.
     pub const NEG_ONE: Self = Self::splat(-1.0);
 
-    /// All NAN.
+    /// All `f64::MIN`.
+    pub const MIN: Self = Self::splat(f64::MIN);
+
+    /// All `f64::MAX`.
+    pub const MAX: Self = Self::splat(f64::MAX);
+
+    /// All `f64::NAN`.
     pub const NAN: Self = Self::splat(f64::NAN);
 
+    /// All `f64::INFINITY`.
+    pub const INFINITY: Self = Self::splat(f64::INFINITY);
+
+    /// All `f64::NEG_INFINITY`.
+    pub const NEG_INFINITY: Self = Self::splat(f64::NEG_INFINITY);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1.0, 0.0, 0.0, 0.0);
 
diff --git a/src/i32/ivec2.rs b/src/i32/ivec2.rs
index a473c5b..724b5fa 100644
--- a/src/i32/ivec2.rs
+++ b/src/i32/ivec2.rs
@@ -34,6 +34,12 @@ impl IVec2 {
     /// All negative ones.
     pub const NEG_ONE: Self = Self::splat(-1);
 
+    /// All `i32::MIN`.
+    pub const MIN: Self = Self::splat(i32::MIN);
+
+    /// All `i32::MAX`.
+    pub const MAX: Self = Self::splat(i32::MAX);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1, 0);
 
diff --git a/src/i32/ivec3.rs b/src/i32/ivec3.rs
index 17fb97d..533426d 100644
--- a/src/i32/ivec3.rs
+++ b/src/i32/ivec3.rs
@@ -34,6 +34,12 @@ impl IVec3 {
     /// All negative ones.
     pub const NEG_ONE: Self = Self::splat(-1);
 
+    /// All `i32::MIN`.
+    pub const MIN: Self = Self::splat(i32::MIN);
+
+    /// All `i32::MAX`.
+    pub const MAX: Self = Self::splat(i32::MAX);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1, 0, 0);
 
diff --git a/src/i32/ivec4.rs b/src/i32/ivec4.rs
index 345cb99..9c3fca1 100644
--- a/src/i32/ivec4.rs
+++ b/src/i32/ivec4.rs
@@ -36,6 +36,12 @@ impl IVec4 {
     /// All negative ones.
     pub const NEG_ONE: Self = Self::splat(-1);
 
+    /// All `i32::MIN`.
+    pub const MIN: Self = Self::splat(i32::MIN);
+
+    /// All `i32::MAX`.
+    pub const MAX: Self = Self::splat(i32::MAX);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1, 0, 0, 0);
 
diff --git a/src/i64/i64vec2.rs b/src/i64/i64vec2.rs
index 8dd3f42..44561a2 100644
--- a/src/i64/i64vec2.rs
+++ b/src/i64/i64vec2.rs
@@ -34,6 +34,12 @@ impl I64Vec2 {
     /// All negative ones.
     pub const NEG_ONE: Self = Self::splat(-1);
 
+    /// All `i64::MIN`.
+    pub const MIN: Self = Self::splat(i64::MIN);
+
+    /// All `i64::MAX`.
+    pub const MAX: Self = Self::splat(i64::MAX);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1, 0);
 
diff --git a/src/i64/i64vec3.rs b/src/i64/i64vec3.rs
index e964e5d..5d2c85e 100644
--- a/src/i64/i64vec3.rs
+++ b/src/i64/i64vec3.rs
@@ -34,6 +34,12 @@ impl I64Vec3 {
     /// All negative ones.
     pub const NEG_ONE: Self = Self::splat(-1);
 
+    /// All `i64::MIN`.
+    pub const MIN: Self = Self::splat(i64::MIN);
+
+    /// All `i64::MAX`.
+    pub const MAX: Self = Self::splat(i64::MAX);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1, 0, 0);
 
diff --git a/src/i64/i64vec4.rs b/src/i64/i64vec4.rs
index ade7ade..ce8e051 100644
--- a/src/i64/i64vec4.rs
+++ b/src/i64/i64vec4.rs
@@ -36,6 +36,12 @@ impl I64Vec4 {
     /// All negative ones.
     pub const NEG_ONE: Self = Self::splat(-1);
 
+    /// All `i64::MIN`.
+    pub const MIN: Self = Self::splat(i64::MIN);
+
+    /// All `i64::MAX`.
+    pub const MAX: Self = Self::splat(i64::MAX);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1, 0, 0, 0);
 
diff --git a/src/u32/uvec2.rs b/src/u32/uvec2.rs
index 7d4d4d7..f953a87 100644
--- a/src/u32/uvec2.rs
+++ b/src/u32/uvec2.rs
@@ -31,6 +31,12 @@ impl UVec2 {
     /// All ones.
     pub const ONE: Self = Self::splat(1);
 
+    /// All `u32::MIN`.
+    pub const MIN: Self = Self::splat(u32::MIN);
+
+    /// All `u32::MAX`.
+    pub const MAX: Self = Self::splat(u32::MAX);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1, 0);
 
diff --git a/src/u32/uvec3.rs b/src/u32/uvec3.rs
index 4e99d31..896d738 100644
--- a/src/u32/uvec3.rs
+++ b/src/u32/uvec3.rs
@@ -31,6 +31,12 @@ impl UVec3 {
     /// All ones.
     pub const ONE: Self = Self::splat(1);
 
+    /// All `u32::MIN`.
+    pub const MIN: Self = Self::splat(u32::MIN);
+
+    /// All `u32::MAX`.
+    pub const MAX: Self = Self::splat(u32::MAX);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1, 0, 0);
 
diff --git a/src/u32/uvec4.rs b/src/u32/uvec4.rs
index d5be46e..0c1df1e 100644
--- a/src/u32/uvec4.rs
+++ b/src/u32/uvec4.rs
@@ -33,6 +33,12 @@ impl UVec4 {
     /// All ones.
     pub const ONE: Self = Self::splat(1);
 
+    /// All `u32::MIN`.
+    pub const MIN: Self = Self::splat(u32::MIN);
+
+    /// All `u32::MAX`.
+    pub const MAX: Self = Self::splat(u32::MAX);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1, 0, 0, 0);
 
diff --git a/src/u64/u64vec2.rs b/src/u64/u64vec2.rs
index 7964a35..3438dbd 100644
--- a/src/u64/u64vec2.rs
+++ b/src/u64/u64vec2.rs
@@ -31,6 +31,12 @@ impl U64Vec2 {
     /// All ones.
     pub const ONE: Self = Self::splat(1);
 
+    /// All `u64::MIN`.
+    pub const MIN: Self = Self::splat(u64::MIN);
+
+    /// All `u64::MAX`.
+    pub const MAX: Self = Self::splat(u64::MAX);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1, 0);
 
diff --git a/src/u64/u64vec3.rs b/src/u64/u64vec3.rs
index bf36ae6..a53eea3 100644
--- a/src/u64/u64vec3.rs
+++ b/src/u64/u64vec3.rs
@@ -31,6 +31,12 @@ impl U64Vec3 {
     /// All ones.
     pub const ONE: Self = Self::splat(1);
 
+    /// All `u64::MIN`.
+    pub const MIN: Self = Self::splat(u64::MIN);
+
+    /// All `u64::MAX`.
+    pub const MAX: Self = Self::splat(u64::MAX);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1, 0, 0);
 
diff --git a/src/u64/u64vec4.rs b/src/u64/u64vec4.rs
index c9645dc..c58d9e1 100644
--- a/src/u64/u64vec4.rs
+++ b/src/u64/u64vec4.rs
@@ -33,6 +33,12 @@ impl U64Vec4 {
     /// All ones.
     pub const ONE: Self = Self::splat(1);
 
+    /// All `u64::MIN`.
+    pub const MIN: Self = Self::splat(u64::MIN);
+
+    /// All `u64::MAX`.
+    pub const MAX: Self = Self::splat(u64::MAX);
+
     /// A unit vector pointing along the positive X axis.
     pub const X: Self = Self::new(1, 0, 0, 0);
 


Test patch:
diff --git a/tests/vec2.rs b/tests/vec2.rs
index 5fdefe4..0672307 100644
--- a/tests/vec2.rs
+++ b/tests/vec2.rs
@@ -4,7 +4,7 @@
 mod support;
 
 macro_rules! impl_vec2_tests {
-    ($t:ty, $new:ident, $vec2:ident, $vec3:ident, $mask:ident) => {
+    ($t:ident, $new:ident, $vec2:ident, $vec3:ident, $mask:ident) => {
         glam_test!(test_const, {
             const V0: $vec2 = $vec2::splat(1 as $t);
             const V1: $vec2 = $vec2::new(1 as $t, 2 as $t);
@@ -19,6 +19,8 @@ macro_rules! impl_vec2_tests {
             assert_eq!($vec2::ONE, $new(1 as $t, 1 as $t));
             assert_eq!($vec2::X, $new(1 as $t, 0 as $t));
             assert_eq!($vec2::Y, $new(0 as $t, 1 as $t));
+            assert_eq!($vec2::MIN, $new($t::MIN, $t::MIN));
+            assert_eq!($vec2::MAX, $new($t::MAX, $t::MAX));
         });
 
         glam_test!(test_new, {
@@ -642,9 +644,9 @@ macro_rules! impl_vec2_float_tests {
             assert_eq!((-$vec2::ZERO).signum(), -$vec2::ONE);
             assert_eq!($vec2::ONE.signum(), $vec2::ONE);
             assert_eq!((-$vec2::ONE).signum(), -$vec2::ONE);
-            assert_eq!($vec2::splat(INFINITY).signum(), $vec2::ONE);
-            assert_eq!($vec2::splat(NEG_INFINITY).signum(), -$vec2::ONE);
-            assert!($vec2::splat(NAN).signum().is_nan_mask().all());
+            assert_eq!($vec2::INFINITY.signum(), $vec2::ONE);
+            assert_eq!($vec2::NEG_INFINITY.signum(), -$vec2::ONE);
+            assert!($vec2::NAN.signum().is_nan_mask().all());
         });
 
         glam_test!(test_copysign, {
@@ -664,24 +666,15 @@ macro_rules! impl_vec2_float_tests {
             assert_eq!((-$vec2::ONE).copysign(-$vec2::ONE), -$vec2::ONE);
             assert_eq!($vec2::ONE.copysign($vec2::ONE), $vec2::ONE);
             assert_eq!((-$vec2::ONE).copysign($vec2::ONE), $vec2::ONE);
+            assert_eq!($vec2::INFINITY.copysign($vec2::ONE), $vec2::INFINITY);
+            assert_eq!($vec2::INFINITY.copysign(-$vec2::ONE), $vec2::NEG_INFINITY);
+            assert_eq!($vec2::NEG_INFINITY.copysign($vec2::ONE), $vec2::INFINITY);
             assert_eq!(
-                $vec2::splat(INFINITY).copysign($vec2::ONE),
-                $vec2::splat(INFINITY)
-            );
-            assert_eq!(
-                $vec2::splat(INFINITY).copysign(-$vec2::ONE),
-                $vec2::splat(NEG_INFINITY)
-            );
-            assert_eq!(
-                $vec2::splat(NEG_INFINITY).copysign($vec2::ONE),
-                $vec2::splat(INFINITY)
-            );
-            assert_eq!(
-                $vec2::splat(NEG_INFINITY).copysign(-$vec2::ONE),
-                $vec2::splat(NEG_INFINITY)
+                $vec2::NEG_INFINITY.copysign(-$vec2::ONE),
+                $vec2::NEG_INFINITY
             );
-            assert!($vec2::splat(NAN).copysign($vec2::ONE).is_nan_mask().all());
-            assert!($vec2::splat(NAN).copysign(-$vec2::ONE).is_nan_mask().all());
+            assert!($vec2::NAN.copysign($vec2::ONE).is_nan_mask().all());
+            assert!($vec2::NAN.copysign(-$vec2::ONE).is_nan_mask().all());
         });
 
         glam_test!(test_float_is_negative_bitmask, {
@@ -760,6 +753,8 @@ macro_rules! impl_vec2_float_tests {
             assert!(!$vec2::new(0.0, NAN).is_finite());
             assert!(!$vec2::new(0.0, NEG_INFINITY).is_finite());
             assert!(!$vec2::new(INFINITY, NEG_INFINITY).is_finite());
+            assert!(!$vec2::INFINITY.is_finite());
+            assert!(!$vec2::NEG_INFINITY.is_finite());
         });
 
         glam_test!(test_powf, {
diff --git a/tests/vec3.rs b/tests/vec3.rs
index 562a27e..a4dc5eb 100644
--- a/tests/vec3.rs
+++ b/tests/vec3.rs
@@ -20,6 +20,8 @@ macro_rules! impl_vec3_tests {
             assert_eq!($vec3::X, $new(1 as $t, 0 as $t, 0 as $t));
             assert_eq!($vec3::Y, $new(0 as $t, 1 as $t, 0 as $t));
             assert_eq!($vec3::Z, $new(0 as $t, 0 as $t, 1 as $t));
+            assert_eq!($vec3::MIN, $new($t::MIN, $t::MIN, $t::MIN));
+            assert_eq!($vec3::MAX, $new($t::MAX, $t::MAX, $t::MAX));
         });
 
         glam_test!(test_new, {
@@ -716,9 +718,9 @@ macro_rules! impl_vec3_float_tests {
             assert_eq!((-$vec3::ZERO).signum(), -$vec3::ONE);
             assert_eq!($vec3::ONE.signum(), $vec3::ONE);
             assert_eq!((-$vec3::ONE).signum(), -$vec3::ONE);
-            assert_eq!($vec3::splat(INFINITY).signum(), $vec3::ONE);
-            assert_eq!($vec3::splat(NEG_INFINITY).signum(), -$vec3::ONE);
-            assert!($vec3::splat(NAN).signum().is_nan_mask().all());
+            assert_eq!($vec3::INFINITY.signum(), $vec3::ONE);
+            assert_eq!($vec3::NEG_INFINITY.signum(), -$vec3::ONE);
+            assert!($vec3::NAN.signum().is_nan_mask().all());
         });
 
         glam_test!(test_copysign, {
@@ -738,24 +740,15 @@ macro_rules! impl_vec3_float_tests {
             assert_eq!((-$vec3::ONE).copysign(-$vec3::ONE), -$vec3::ONE);
             assert_eq!($vec3::ONE.copysign($vec3::ONE), $vec3::ONE);
             assert_eq!((-$vec3::ONE).copysign($vec3::ONE), $vec3::ONE);
+            assert_eq!($vec3::INFINITY.copysign($vec3::ONE), $vec3::INFINITY);
+            assert_eq!($vec3::INFINITY.copysign(-$vec3::ONE), $vec3::NEG_INFINITY);
+            assert_eq!($vec3::NEG_INFINITY.copysign($vec3::ONE), $vec3::INFINITY);
             assert_eq!(
-                $vec3::splat(INFINITY).copysign($vec3::ONE),
-                $vec3::splat(INFINITY)
+                $vec3::NEG_INFINITY.copysign(-$vec3::ONE),
+                $vec3::NEG_INFINITY
             );
-            assert_eq!(
-                $vec3::splat(INFINITY).copysign(-$vec3::ONE),
-                $vec3::splat(NEG_INFINITY)
-            );
-            assert_eq!(
-                $vec3::splat(NEG_INFINITY).copysign($vec3::ONE),
-                $vec3::splat(INFINITY)
-            );
-            assert_eq!(
-                $vec3::splat(NEG_INFINITY).copysign(-$vec3::ONE),
-                $vec3::splat(NEG_INFINITY)
-            );
-            assert!($vec3::splat(NAN).copysign($vec3::ONE).is_nan_mask().all());
-            assert!($vec3::splat(NAN).copysign(-$vec3::ONE).is_nan_mask().all());
+            assert!($vec3::NAN.copysign($vec3::ONE).is_nan_mask().all());
+            assert!($vec3::NAN.copysign(-$vec3::ONE).is_nan_mask().all());
         });
 
         glam_test!(test_float_is_negative_bitmask, {
@@ -843,7 +836,9 @@ macro_rules! impl_vec3_float_tests {
             assert!(!$vec3::new(INFINITY, 0.0, 0.0).is_finite());
             assert!(!$vec3::new(0.0, NAN, 0.0).is_finite());
             assert!(!$vec3::new(0.0, 0.0, NEG_INFINITY).is_finite());
-            assert!(!$vec3::splat(NAN).is_finite());
+            assert!(!$vec3::NAN.is_finite());
+            assert!(!$vec3::INFINITY.is_finite());
+            assert!(!$vec3::NEG_INFINITY.is_finite());
         });
 
         glam_test!(test_powf, {
diff --git a/tests/vec4.rs b/tests/vec4.rs
index 030181f..03ba660 100644
--- a/tests/vec4.rs
+++ b/tests/vec4.rs
@@ -21,6 +21,8 @@ macro_rules! impl_vec4_tests {
             assert_eq!($vec4::Y, $new(0 as $t, 1 as $t, 0 as $t, 0 as $t));
             assert_eq!($vec4::Z, $new(0 as $t, 0 as $t, 1 as $t, 0 as $t));
             assert_eq!($vec4::W, $new(0 as $t, 0 as $t, 0 as $t, 1 as $t));
+            assert_eq!($vec4::MIN, $new($t::MIN, $t::MIN, $t::MIN, $t::MIN));
+            assert_eq!($vec4::MAX, $new($t::MAX, $t::MAX, $t::MAX, $t::MAX));
         });
 
         glam_test!(test_new, {
@@ -804,9 +806,9 @@ macro_rules! impl_vec4_float_tests {
             assert_eq!((-$vec4::ZERO).signum(), -$vec4::ONE);
             assert_eq!($vec4::ONE.signum(), $vec4::ONE);
             assert_eq!((-$vec4::ONE).signum(), -$vec4::ONE);
-            assert_eq!($vec4::splat(INFINITY).signum(), $vec4::ONE);
-            assert_eq!($vec4::splat(NEG_INFINITY).signum(), -$vec4::ONE);
-            assert!($vec4::splat(NAN).signum().is_nan_mask().all());
+            assert_eq!($vec4::INFINITY.signum(), $vec4::ONE);
+            assert_eq!($vec4::NEG_INFINITY.signum(), -$vec4::ONE);
+            assert!($vec4::NAN.signum().is_nan_mask().all());
         });
 
         glam_test!(test_copysign, {
@@ -826,24 +828,15 @@ macro_rules! impl_vec4_float_tests {
             assert_eq!((-$vec4::ONE).copysign(-$vec4::ONE), -$vec4::ONE);
             assert_eq!($vec4::ONE.copysign($vec4::ONE), $vec4::ONE);
             assert_eq!((-$vec4::ONE).copysign($vec4::ONE), $vec4::ONE);
+            assert_eq!($vec4::INFINITY.copysign($vec4::ONE), $vec4::INFINITY);
+            assert_eq!($vec4::INFINITY.copysign(-$vec4::ONE), $vec4::NEG_INFINITY);
+            assert_eq!($vec4::NEG_INFINITY.copysign($vec4::ONE), $vec4::INFINITY);
             assert_eq!(
-                $vec4::splat(INFINITY).copysign($vec4::ONE),
-                $vec4::splat(INFINITY)
+                $vec4::NEG_INFINITY.copysign(-$vec4::ONE),
+                $vec4::NEG_INFINITY
             );
-            assert_eq!(
-                $vec4::splat(INFINITY).copysign(-$vec4::ONE),
-                $vec4::splat(NEG_INFINITY)
-            );
-            assert_eq!(
-                $vec4::splat(NEG_INFINITY).copysign($vec4::ONE),
-                $vec4::splat(INFINITY)
-            );
-            assert_eq!(
-                $vec4::splat(NEG_INFINITY).copysign(-$vec4::ONE),
-                $vec4::splat(NEG_INFINITY)
-            );
-            assert!($vec4::splat(NAN).copysign($vec4::ONE).is_nan_mask().all());
-            assert!($vec4::splat(NAN).copysign(-$vec4::ONE).is_nan_mask().all());
+            assert!($vec4::NAN.copysign($vec4::ONE).is_nan_mask().all());
+            assert!($vec4::NAN.copysign(-$vec4::ONE).is_nan_mask().all());
         });
 
         glam_test!(test_float_is_negative_bitmask, {
@@ -947,6 +940,8 @@ macro_rules! impl_vec4_float_tests {
             assert!(!$vec4::new(0.0, NAN, 0.0, 0.0).is_finite());
             assert!(!$vec4::new(0.0, 0.0, NEG_INFINITY, 0.0).is_finite());
             assert!(!$vec4::new(0.0, 0.0, 0.0, NAN).is_finite());
+            assert!(!$vec4::INFINITY.is_finite());
+            assert!(!$vec4::NEG_INFINITY.is_finite());
         });
 
         glam_test!(test_powf, {