Skip to content

Commit 05ff4dc

Browse files
committed
**Fixed**:
- Fixed the *RngLogic.Range(float, float, bool)* method to allow having the same min and max values with maxInclusive set to true
1 parent 4592e11 commit 05ff4dc

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this package will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [0.14.1] - 2024-11-30
8+
9+
**Fixed**:
10+
- Fixed the *RngLogic.Range(float, float, bool)* method to allow having the same min and max values with maxInclusive set to true
11+
712
## [0.14.0] - 2024-11-15
813

914
**New**:

Runtime/RngService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ public static int Range(int min, int max, int[] rndState, bool maxInclusive)
220220
/// </remarks>
221221
public static floatP Range(floatP min, floatP max, int[] rndState, bool maxInclusive)
222222
{
223-
if (min > max || maxInclusive && Math.Abs(min - max) < floatP.Epsilon)
223+
if (min > max || (!maxInclusive && Math.Abs(min - max) < floatP.Epsilon))
224224
{
225225
throw new IndexOutOfRangeException("The min range value must be less the max range value");
226226
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "com.gamelovers.services",
33
"displayName": "Services",
44
"author": "Miguel Tomas",
5-
"version": "0.14.0",
5+
"version": "0.14.1",
66
"unity": "2022.3",
77
"license": "MIT",
88
"description": "The purpose of this package is to provide a set of services to ease the development of a basic game architecture",

0 commit comments

Comments
 (0)