Skip to content

Commit 824843b

Browse files
committed
Fix JVM Clash
1 parent 3d110f6 commit 824843b

File tree

1 file changed

+2
-36
lines changed

1 file changed

+2
-36
lines changed

src/main/kotlin/xyz/calcugames/levelz/coord/functions.kt

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,7 @@ fun coordinate2D(xy: DoubleArray) = Coordinate2D(xy[0], xy[1])
5353
* @param y The supplier to the y value.
5454
* @return The 2D coordinate.
5555
*/
56-
fun coordinate2D(x: () -> Int, y: () -> Int): Coordinate2D = Coordinate2D(x(), y())
57-
58-
/**
59-
* Creates a 2D coordinate.
60-
* @param x The supplier to the x value.
61-
* @param y The supplier to the y value.
62-
* @return The 2D coordinate.
63-
*/
64-
fun coordinate2D(x: () -> Float, y: () -> Float): Coordinate2D = Coordinate2D(x().toDouble(), y().toDouble())
65-
66-
/**
67-
* Creates a 2D coordinate.
68-
* @param x The supplier to the x value.
69-
* @param y The supplier to the y value.
70-
* @return The 2D coordinate.
71-
*/
72-
fun coordinate2D(x: () -> Double, y: () -> Double): Coordinate2D = Coordinate2D(x(), y())
56+
fun coordinate2D(x: () -> Number, y: () -> Number): Coordinate2D = Coordinate2D(x().toDouble(), y().toDouble())
7357

7458
// Coordinate3D
7559

@@ -128,22 +112,4 @@ fun coordinate3D(xyz: DoubleArray) = Coordinate3D(xyz[0], xyz[1], xyz[2])
128112
* @param z The supplier to the z value.
129113
* @return The 3D coordinate.
130114
*/
131-
fun coordinate3D(x: () -> Int, y: () -> Int, z: () -> Int): Coordinate3D = Coordinate3D(x(), y(), z())
132-
133-
/**
134-
* Creates a 3D coordinate.
135-
* @param x The supplier to the x value.
136-
* @param y The supplier to the y value.
137-
* @param z The supplier to the z value.
138-
* @return The 3D coordinate.
139-
*/
140-
fun coordinate3D(x: () -> Float, y: () -> Float, z: () -> Float): Coordinate3D = Coordinate3D(x().toDouble(), y().toDouble(), z().toDouble())
141-
142-
/**
143-
* Creates a 3D coordinate.
144-
* @param x The supplier to the x value.
145-
* @param y The supplier to the y value.
146-
* @param z The supplier to the z value.
147-
* @return The 3D coordinate.
148-
*/
149-
fun coordinate3D(x: () -> Double, y: () -> Double, z: () -> Double): Coordinate3D = Coordinate3D(x(), y(), z())
115+
fun coordinate3D(x: () -> Number, y: () -> Number, z: () -> Number): Coordinate3D = Coordinate3D(x().toDouble(), y().toDouble(), z().toDouble())

0 commit comments

Comments
 (0)