From aa5b4ca36fce0c30c3c2e50d223f55f75b7c9945 Mon Sep 17 00:00:00 2001 From: Jonathan Mankin Date: Thu, 11 Jan 2024 10:34:23 -0800 Subject: [PATCH 1/7] prep for release --- src/CHANGELOG.md | 2 +- src/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md index f51a25d0..3cb929f3 100755 --- a/src/CHANGELOG.md +++ b/src/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## [Unreleased] +## [1.3.2] - 2024-01-11 ### Fixed * Fixed `math.hash` crash when using IL2CPP builds on Arm 32 bit devices. diff --git a/src/package.json b/src/package.json index 5e0509b2..f8870fc2 100755 --- a/src/package.json +++ b/src/package.json @@ -1,7 +1,7 @@ { "name": "com.unity.mathematics", "displayName": "Mathematics", - "version": "1.3.1", + "version": "1.3.2", "unity": "2018.3", "description": "Unity's C# SIMD math library providing vector types and math functions with a shader like syntax.", "keywords": [ From 47ef6321a25c7ba609d4de0b45b0902f4eb9565d Mon Sep 17 00:00:00 2001 From: Jonathan Mankin Date: Thu, 11 Jan 2024 12:39:00 -0800 Subject: [PATCH 2/7] change minimum unity version --- src/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/package.json b/src/package.json index f8870fc2..9944d6fe 100755 --- a/src/package.json +++ b/src/package.json @@ -2,7 +2,7 @@ "name": "com.unity.mathematics", "displayName": "Mathematics", "version": "1.3.2", - "unity": "2018.3", + "unity": "2021.3", "description": "Unity's C# SIMD math library providing vector types and math functions with a shader like syntax.", "keywords": [ "unity" From b7986ef8e6ce35cab339222b81027785e30a53c0 Mon Sep 17 00:00:00 2001 From: Jonathan Mankin Date: Thu, 11 Jan 2024 12:58:09 -0800 Subject: [PATCH 3/7] Update CHANGELOG.md --- src/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md index 3cb929f3..484b5af3 100755 --- a/src/CHANGELOG.md +++ b/src/CHANGELOG.md @@ -5,6 +5,7 @@ ### Fixed * Fixed `math.hash` crash when using IL2CPP builds on Arm 32 bit devices. * Fixed obsolete method usage warnings for `MatrixDrawer.CanCacheInspectorGUI` and `PrimitiveVectorDrawer.CanCacheInspectorGUI` in UNITY_2023_2_OR_NEWER. +* Updated minimum editor version to 2021.3 ## [1.3.1] - 2023-07-12 From 1695a8503482a3131be78cc26308a93f82c05b04 Mon Sep 17 00:00:00 2001 From: Jonathan Mankin Date: Thu, 11 Jan 2024 14:31:59 -0800 Subject: [PATCH 4/7] update validation exceptions Need an exception due to us updating the minimum unity version to a supported Unity Version. --- src/ValidationExceptions.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ValidationExceptions.json b/src/ValidationExceptions.json index e8a81512..3406ed9e 100644 --- a/src/ValidationExceptions.json +++ b/src/ValidationExceptions.json @@ -1,5 +1,10 @@ { "ErrorExceptions": [ + { + "ValidationTest": "Package Unity Version Validation", + "ExceptionMessage": "The Unity version requirement is more strict than in the previous version of the package. Increment the minor version of the package to leave patch versions available for previous version. Read more about this error and potential solutions at https://docs.unity3d.com/Packages/com.unity.package-validation-suite@latest/index.html?preview=1&subfolder=/manual/package_unity_version_validation_error.html#the-unity-version-requirement-is-more-strict-than-in-the-previous-version-of-the-package", + "PackageVersion": "1.3.2" + } ], "WarningExceptions": [] } \ No newline at end of file From 4a4ece972005c927d6804ee6d6e4ff6961bff22d Mon Sep 17 00:00:00 2001 From: Peter Lu Date: Fri, 17 Jul 2026 20:04:29 -0400 Subject: [PATCH 5/7] Added a remark to NextFloatX and NextDoubleX methods with a min and max parameter. The affine (min, max) overloads compute the result as value * (max - min) + min. Floating-point rounding (round-half-to-even) can in rare cases return exactly max instead of a value strictly below it, so the [min, max) interval is the intent rather than a hard guarantee. --- src/Unity.Mathematics/random.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Unity.Mathematics/random.cs b/src/Unity.Mathematics/random.cs index 3c94b6e3..a6c77d5c 100644 --- a/src/Unity.Mathematics/random.cs +++ b/src/Unity.Mathematics/random.cs @@ -468,6 +468,7 @@ public float4 NextFloat4() /// The minimum value to generate, inclusive. /// The maximum value to generate, exclusive. /// A uniformly random float value in the range [min, max). + /// The result is computed as `NextFloat() * (max - min) + min`, so floating-point rounding can in rare cases return a value equal to `max` rather than strictly less than it. Clamp the result if you require a value strictly less than `max`. [MethodImpl(MethodImplOptions.AggressiveInlining)] public float NextFloat(float min, float max) { return NextFloat() * (max - min) + min; } @@ -475,6 +476,7 @@ public float4 NextFloat4() /// The componentwise minimum value to generate, inclusive. /// The componentwise maximum value to generate, exclusive. /// A uniformly random float2 value in the range [min, max). + /// Each component is computed as `NextFloat() * (max - min) + min`, so floating-point rounding can in rare cases return a component equal to the corresponding component of `max` rather than strictly less than it. Clamp the result if you require components strictly less than `max`. [MethodImpl(MethodImplOptions.AggressiveInlining)] public float2 NextFloat2(float2 min, float2 max) { return NextFloat2() * (max - min) + min; } @@ -482,6 +484,7 @@ public float4 NextFloat4() /// The componentwise minimum value to generate, inclusive. /// The componentwise maximum value to generate, exclusive. /// A uniformly random float3 value in the range [min, max). + /// Each component is computed as `NextFloat() * (max - min) + min`, so floating-point rounding can in rare cases return a component equal to the corresponding component of `max` rather than strictly less than it. Clamp the result if you require components strictly less than `max`. [MethodImpl(MethodImplOptions.AggressiveInlining)] public float3 NextFloat3(float3 min, float3 max) { return NextFloat3() * (max - min) + min; } @@ -489,6 +492,7 @@ public float4 NextFloat4() /// The componentwise minimum value to generate, inclusive. /// The componentwise maximum value to generate, exclusive. /// A uniformly random float4 value in the range [min, max). + /// Each component is computed as `NextFloat() * (max - min) + min`, so floating-point rounding can in rare cases return a component equal to the corresponding component of `max` rather than strictly less than it. Clamp the result if you require components strictly less than `max`. [MethodImpl(MethodImplOptions.AggressiveInlining)] public float4 NextFloat4(float4 min, float4 max) { return NextFloat4() * (max - min) + min; } @@ -572,6 +576,7 @@ public double4 NextDouble4() /// The minimum value to generate, inclusive. /// The maximum value to generate, exclusive. /// A uniformly random double value in the range [min, max). + /// The result is computed as `NextDouble() * (max - min) + min`, so floating-point rounding can in rare cases return a value equal to `max` rather than strictly less than it. Clamp the result if you require a value strictly less than `max`. [MethodImpl(MethodImplOptions.AggressiveInlining)] public double NextDouble(double min, double max) { return NextDouble() * (max - min) + min; } @@ -579,6 +584,7 @@ public double4 NextDouble4() /// The componentwise minimum value to generate, inclusive. /// The componentwise maximum value to generate, exclusive. /// A uniformly random double2 value in the range [min, max). + /// Each component is computed as `NextDouble() * (max - min) + min`, so floating-point rounding can in rare cases return a component equal to the corresponding component of `max` rather than strictly less than it. Clamp the result if you require components strictly less than `max`. [MethodImpl(MethodImplOptions.AggressiveInlining)] public double2 NextDouble2(double2 min, double2 max) { return NextDouble2() * (max - min) + min; } @@ -586,6 +592,7 @@ public double4 NextDouble4() /// The componentwise minimum value to generate, inclusive. /// The componentwise maximum value to generate, exclusive. /// A uniformly random double3 value in the range [min, max). + /// Each component is computed as `NextDouble() * (max - min) + min`, so floating-point rounding can in rare cases return a component equal to the corresponding component of `max` rather than strictly less than it. Clamp the result if you require components strictly less than `max`. [MethodImpl(MethodImplOptions.AggressiveInlining)] public double3 NextDouble3(double3 min, double3 max) { return NextDouble3() * (max - min) + min; } @@ -593,6 +600,7 @@ public double4 NextDouble4() /// The componentwise minimum value to generate, inclusive. /// The componentwise maximum value to generate, exclusive. /// A uniformly random double4 value in the range [min, max). + /// Each component is computed as `NextDouble() * (max - min) + min`, so floating-point rounding can in rare cases return a component equal to the corresponding component of `max` rather than strictly less than it. Clamp the result if you require components strictly less than `max`. [MethodImpl(MethodImplOptions.AggressiveInlining)] public double4 NextDouble4(double4 min, double4 max) { return NextDouble4() * (max - min) + min; } From f37f578a7cc32f599f96cdab007c88d12b6c8605 Mon Sep 17 00:00:00 2001 From: Peter Lu Date: Fri, 17 Jul 2026 20:06:27 -0400 Subject: [PATCH 6/7] -Added a unreleased changelog version and entry for the documentation port -Removed the ValidationExceptions.json entry needed for the last package release --- src/CHANGELOG.md | 3 +++ src/ValidationExceptions.json | 8 +------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md index 484b5af3..595ffd52 100755 --- a/src/CHANGELOG.md +++ b/src/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## [Unreleased] +* Added a documentation remark for Random NextFloat and NextDouble methods with a min and max parameter. + ## [1.3.2] - 2024-01-11 ### Fixed diff --git a/src/ValidationExceptions.json b/src/ValidationExceptions.json index 3406ed9e..c9391d89 100644 --- a/src/ValidationExceptions.json +++ b/src/ValidationExceptions.json @@ -1,10 +1,4 @@ { - "ErrorExceptions": [ - { - "ValidationTest": "Package Unity Version Validation", - "ExceptionMessage": "The Unity version requirement is more strict than in the previous version of the package. Increment the minor version of the package to leave patch versions available for previous version. Read more about this error and potential solutions at https://docs.unity3d.com/Packages/com.unity.package-validation-suite@latest/index.html?preview=1&subfolder=/manual/package_unity_version_validation_error.html#the-unity-version-requirement-is-more-strict-than-in-the-previous-version-of-the-package", - "PackageVersion": "1.3.2" - } - ], + "ErrorExceptions": [], "WarningExceptions": [] } \ No newline at end of file From 6ffc2a46a14f4666ac19048356b57ebe3701ebea Mon Sep 17 00:00:00 2001 From: Peter Lu Date: Fri, 17 Jul 2026 20:09:43 -0400 Subject: [PATCH 7/7] Removing out of support editors from package validation YML --- .yamato/upm-ci.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.yamato/upm-ci.yml b/.yamato/upm-ci.yml index 3675e42d..27b41405 100644 --- a/.yamato/upm-ci.yml +++ b/.yamato/upm-ci.yml @@ -27,24 +27,16 @@ upmci_platforms: flavor: b1.large validate_editor_versions: - - version: "2022.3" - display_name: "2022.3" - version: "6000.0" display_name: "6000.0" - version: "6000.3" display_name: "6000.3" - - version: "6000.4" - display_name: "6000.4" package_tests_editor_versions: - - version: "2022.3" - display_name: "2022.3" - version: "6000.0" display_name: "6000.0" - version: "6000.3" display_name: "6000.3" - - version: "6000.4" - display_name: "6000.4" --- {% for platform in upmci_platforms %}