Skip to content

Commit 670af0b

Browse files
committed
-Fix Random.cs not being able to function properly as it was not labelled static.
1 parent fdee0d0 commit 670af0b

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.3.1] - 2023-02-01
11+
12+
### Fixed
13+
14+
- Methods from Random.cs not being able to be used due to them and their class not being labelled correctly as static.
15+
1016
## [0.3.0] - 2023-02-01
1117

1218
### Added
@@ -56,7 +62,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5662
- PointComputations.cs, to facilitate convex hull computation, point cloud simplification, and continuing on, any solely point-based methods.
5763
- Conversion.cs, to allow conversion of Vector types.
5864

59-
[unreleased]: https://github.com/IrishFix/Computational-Geometry/compare/v0.3.0...HEAD
65+
[unreleased]: https://github.com/IrishFix/Computational-Geometry/compare/v0.3.1...HEAD
66+
[0.3.1]: https://github.com/IrishFix/Computational-Geometry/compare/v0.3.0...v0.3.1
6067
[0.3.0]: https://github.com/IrishFix/Computational-Geometry/compare/v0.2.2...v0.3.0
6168
[0.2.2]: https://github.com/IrishFix/Computational-Geometry/compare/v0.2.1...v0.2.2
6269
[0.2.1]: https://github.com/IrishFix/Computational-Geometry/compare/v0.2.0...v0.2.1

Runtime/Random.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
// ReSharper disable once CheckNamespace
55
namespace ComputationalGeometry {
6-
public class Random {
7-
public IEnumerable<Vector3> SphericalPointCloud(Vector3 Center, int Count, float Radius, float Deviation) {
6+
public static class Random {
7+
public static IEnumerable<Vector3> SphericalPointCloud(Vector3 Center, int Count, float Radius, float Deviation) {
88
List<Vector3> PointCloud = new List<Vector3>();
99
float RadiusSquared = Radius * Radius;
1010
for (int i = 0; i < Count; i++) {
@@ -25,7 +25,7 @@ public IEnumerable<Vector3> SphericalPointCloud(Vector3 Center, int Count, float
2525
return PointCloud;
2626
}
2727

28-
public IEnumerable<Vector3> CubicalPointCloud(Vector3 Center, int Count, float Radius, float Deviation) {
28+
public static IEnumerable<Vector3> CubicalPointCloud(Vector3 Center, int Count, float Radius, float Deviation) {
2929
List<Vector3> PointCloud = new List<Vector3>();
3030
for (int i = 0; i < Count; i++) {
3131
Vector3 RandomPoint = Center + new Vector3(UnityEngine.Random.Range(-Radius, Radius),
@@ -39,7 +39,7 @@ public IEnumerable<Vector3> CubicalPointCloud(Vector3 Center, int Count, float R
3939
return PointCloud;
4040
}
4141

42-
public IEnumerable<Vector2> CircularPointCloud(Vector2 Center, int Count, float Radius, float Deviation) {
42+
public static IEnumerable<Vector2> CircularPointCloud(Vector2 Center, int Count, float Radius, float Deviation) {
4343
List<Vector2> PointCloud = new List<Vector2>();
4444
float RadiusSquared = Radius * Radius;
4545
for (int i = 0; i < Count; i++) {
@@ -58,7 +58,7 @@ public IEnumerable<Vector2> CircularPointCloud(Vector2 Center, int Count, float
5858
return PointCloud;
5959
}
6060

61-
public IEnumerable<Vector2> SquarePointCloud(Vector2 Center, int Count, float Radius, float Deviation) {
61+
public static IEnumerable<Vector2> SquarePointCloud(Vector2 Center, int Count, float Radius, float Deviation) {
6262
List<Vector2> PointCloud = new List<Vector2>();
6363
for (int i = 0; i < Count; i++) {
6464
Vector2 RandomPoint = Center + new Vector2(UnityEngine.Random.Range(-Radius, Radius),

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Computational Geometry is a mathematical package oriented on making triangulation, point manipulation, intersection calculation and more; as simple as possible.",
55
"unity": "2021.3",
66
"unityRelease": "17f1",
7-
"version": "0.3.0",
7+
"version": "0.3.1",
88
"keywords": ["Mathematics", "Maths", "Math", "Computation", "Geometry", "Triangulation", "Delaunay"],
99
"license": "GPL-3.0-only",
1010
"licensesUrl": "https://spdx.org/licenses/GPL-3.0-only.html",

0 commit comments

Comments
 (0)