Skip to content

Commit bee065e

Browse files
Merge pull request #129 from FishingCactus/fix/default_constructors
Fix/default constructors
2 parents 6696b11 + cb9ba5b commit bee065e

3 files changed

Lines changed: 25 additions & 1 deletion

File tree

CHANGELOG.md

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

8+
## [2.7.1] - 2025-11-19
9+
10+
### Added
11+
12+
- Default constructors for `IntegerRange`, `FloatRange` and `Vector3Range`
13+
814
## [2.7.0] - 2025-09-09
915

1016
### Added

Runtime/Range.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ public class IntegerRange : Range< int >
4343

4444
// -- METHODS
4545

46+
public IntegerRange()
47+
{
48+
MinimumValue = 0;
49+
MaximumValue = 1;
50+
}
51+
4652
public IntegerRange(
4753
int minimum_value,
4854
int maximum_value
@@ -76,6 +82,12 @@ public class FloatRange : Range<float>
7682

7783
// -- METHODS
7884

85+
public FloatRange()
86+
{
87+
MinimumValue = 0.0f;
88+
MaximumValue = 1.0f;
89+
}
90+
7991
public FloatRange(
8092
float minimum_value,
8193
float maximum_value
@@ -109,6 +121,12 @@ public class Vector3Range : Range<Vector3>
109121

110122
// -- METHODS
111123

124+
public Vector3Range()
125+
{
126+
MinimumValue = Vector3.zero;
127+
MaximumValue = Vector3.one;
128+
}
129+
112130
public Vector3Range(
113131
Vector3 minimum_value,
114132
Vector3 maximum_value

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.fishingcactus.common-code",
3-
"version": "2.7.0",
3+
"version": "2.7.1",
44
"displayName": "Common Code",
55
"description": "Code, Extensions and extra features for Fishing Cactus Games.",
66
"unity": "2020.3",

0 commit comments

Comments
 (0)