Skip to content

Commit df09037

Browse files
committed
dummy commit, netbeans problems
1 parent 206b392 commit df09037

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+5496
-4665
lines changed

src/main/kotlin/glm_/bitfield.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ interface bitfield {
322322
res.w = bitfieldFillOne(in_.w, firstBit, bitCount)
323323
return res
324324
}
325-
325+
326326
fun bitfieldFillZero(value: Int, firstBit: Int, bitCount: Int) = value and (mask(bitCount) shl firstBit).inv()
327327

328328
fun bitfieldFillZero(in_: Vec1i, firstBit: Int, bitCount: Int, res: Vec1i = Vec1i()): Vec1i {

src/main/kotlin/glm_/colorSpace.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ interface colorSpace {
2020

2121
return res
2222
}
23-
23+
2424
fun convertLinearToSRGB(colorLinear: Vec4, res: Vec4 = Vec4()) = compute_rgbToSrgb(colorLinear, 0.41666f, res)
2525
fun convertLinearToSRGB(colorLinear: Vec4, gamma: Float, res: Vec4 = Vec4()) = compute_rgbToSrgb(colorLinear, 1 / gamma, res)
2626

@@ -58,7 +58,7 @@ interface colorSpace {
5858

5959
return res
6060
}
61-
61+
6262
fun convertSRGBToLinear(colorSRGB: Vec4, res: Vec4 = Vec4()) = compute_srgbToRgb(colorSRGB, 2.4f, res)
6363
fun convertSRGBToLinear(colorLinear: Vec4, gamma: Float, res: Vec4 = Vec4()) = compute_srgbToRgb(colorLinear, gamma, res)
6464

src/main/kotlin/glm_/epsilon.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
package glm_
22

3+
import glm_.glm.abs
34
import glm_.glm.greaterThan
45
import glm_.glm.lessThan
56
import glm_.quat.Quat
67
import glm_.quat.QuatD
78
import glm_.vec2.*
89
import glm_.vec3.*
910
import glm_.vec4.*
10-
import glm_.glm.abs
1111

1212
/**
1313
* Created by GBarbieri on 11.11.2016.

src/main/kotlin/glm_/extensions.kt

Lines changed: 61 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package glm_
22

33
import glm_.mat4x4.Mat4
44
import unsigned.*
5-
import java.io.DataInputStream
65
import java.io.InputStream
76
import java.math.BigInteger
87
import kotlin.experimental.or
@@ -154,13 +153,14 @@ val String.f get() = toFloat()
154153
val String.b get() = toByte()
155154
val String.d get() = toDouble()
156155
val String.i get() = if (startsWith("0x")) java.lang.Integer.parseInt(substring(2), 16) else toInt()
157-
val String.L get() = try {
158-
if (startsWith("0x"))
159-
java.lang.Long.parseLong(substring(2), 16)
160-
else toLong()
161-
} catch (ex: NumberFormatException) {
162-
bi.L
163-
}
156+
val String.L
157+
get() = try {
158+
if (startsWith("0x"))
159+
java.lang.Long.parseLong(substring(2), 16)
160+
else toLong()
161+
} catch (ex: NumberFormatException) {
162+
bi.L
163+
}
164164
val String.s get() = toShort()
165165
// TODO unsigned String extensions
166166
val String.ub get() = Ubyte(this)
@@ -170,8 +170,6 @@ val String.us get() = Ushort(this)
170170
val String.bi get() = if (startsWith("0x")) BigInteger(substring(2), 16) else BigInteger(this)
171171

172172

173-
174-
175173
fun InputStream.int(bigEndianess: Boolean = true): Int {
176174
val a = read()
177175
val b = read()
@@ -209,50 +207,56 @@ fun InputStream.mat4(bigEndianess: Boolean = true) = Mat4(
209207
float(bigEndianess), float(bigEndianess), float(bigEndianess), float(bigEndianess),
210208
float(bigEndianess), float(bigEndianess), float(bigEndianess), float(bigEndianess))
211209

212-
val Any.f get() = when (this) {
213-
is Number -> this.f
214-
is Char -> this.f
215-
is Boolean -> this.f
216-
is String -> this.f
217-
else -> throw ArithmeticException("incompatible type")
218-
}
219-
220-
val Any.b get() = when (this) {
221-
is Number -> this.b
222-
is Char -> this.b
223-
is Boolean -> this.b
224-
is String -> this.b
225-
else -> throw ArithmeticException("incompatible type")
226-
}
227-
228-
val Any.d get() = when (this) {
229-
is Number -> this.d
230-
is Char -> this.d
231-
is Boolean -> this.d
232-
is String -> this.d
233-
else -> throw ArithmeticException("incompatible type")
234-
}
235-
236-
val Any.i get() = when (this) {
237-
is Number -> this.d
238-
is Char -> this.d
239-
is Boolean -> this.d
240-
is String -> this.d
241-
else -> throw ArithmeticException("incompatible type")
242-
}
243-
244-
val Any.L get() = when (this) {
245-
is Number -> this.L
246-
is Char -> this.L
247-
is Boolean -> this.L
248-
is String -> this.L
249-
else -> throw ArithmeticException("incompatible type")
250-
}
251-
252-
val Any.s get() = when (this) {
253-
is Number -> this.s
254-
is Char -> this.s
255-
is Boolean -> this.s
256-
is String -> this.s
257-
else -> throw ArithmeticException("incompatible type")
258-
}
210+
val Any.f
211+
get() = when (this) {
212+
is Number -> this.f
213+
is Char -> this.f
214+
is Boolean -> this.f
215+
is String -> this.f
216+
else -> throw ArithmeticException("incompatible type")
217+
}
218+
219+
val Any.b
220+
get() = when (this) {
221+
is Number -> this.b
222+
is Char -> this.b
223+
is Boolean -> this.b
224+
is String -> this.b
225+
else -> throw ArithmeticException("incompatible type")
226+
}
227+
228+
val Any.d
229+
get() = when (this) {
230+
is Number -> this.d
231+
is Char -> this.d
232+
is Boolean -> this.d
233+
is String -> this.d
234+
else -> throw ArithmeticException("incompatible type")
235+
}
236+
237+
val Any.i
238+
get() = when (this) {
239+
is Number -> this.d
240+
is Char -> this.d
241+
is Boolean -> this.d
242+
is String -> this.d
243+
else -> throw ArithmeticException("incompatible type")
244+
}
245+
246+
val Any.L
247+
get() = when (this) {
248+
is Number -> this.L
249+
is Char -> this.L
250+
is Boolean -> this.L
251+
is String -> this.L
252+
else -> throw ArithmeticException("incompatible type")
253+
}
254+
255+
val Any.s
256+
get() = when (this) {
257+
is Number -> this.s
258+
is Char -> this.s
259+
is Boolean -> this.s
260+
is String -> this.s
261+
else -> throw ArithmeticException("incompatible type")
262+
}

src/main/kotlin/glm_/func/common/func_common.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@ package glm_.func.common
33
import glm_.*
44
import glm_.glm.ceil
55
import glm_.glm.clamp
6-
import glm_.glm.floatBitsToInt
7-
import glm_.glm.floatBitsToUint
86
import glm_.glm.floor
97
import glm_.glm.fma
108
import glm_.glm.fract
11-
import glm_.glm.intBitsToFloat
129
import glm_.glm.isInf
1310
import glm_.glm.isNan
1411
import glm_.glm.max
@@ -18,16 +15,15 @@ import glm_.glm.sign
1815
import glm_.glm.smoothStep
1916
import glm_.glm.step
2017
import glm_.glm.trunc
21-
import glm_.glm.uintBitsToFloat
2218
import unsigned.Uint
2319
import unsigned.Ulong
2420
import kotlin.math.absoluteValue
2521
import kotlin.math.sign
22+
import kotlin.math.ceil as _ceil
2623
import kotlin.math.floor as _floor
2724
import kotlin.math.max as _max
2825
import kotlin.math.min as _min
2926
import kotlin.math.round as _round
30-
import kotlin.math.ceil as _ceil
3127

3228

3329
/**

src/main/kotlin/glm_/func/func_exponential.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package glm_.func
22

3-
import glm_.d
4-
import glm_.f
53
import glm_.vec2.Vec2
64
import glm_.vec2.Vec2d
75
import glm_.vec3.Vec3

src/main/kotlin/glm_/func/func_trigonometric.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import glm_.vec3.Vec3
88
import glm_.vec3.Vec3d
99
import glm_.vec4.Vec4
1010
import glm_.vec4.Vec4d
11-
import kotlin.math.cos as _cos
12-
import kotlin.math.sin as _sin
13-
import kotlin.math.tan as _tan
11+
import kotlin.math.atan2
1412
import kotlin.math.acos as _acos
1513
import kotlin.math.asin as _asin
1614
import kotlin.math.atan as _atan
17-
import kotlin.math.atan2
15+
import kotlin.math.cos as _cos
16+
import kotlin.math.sin as _sin
17+
import kotlin.math.tan as _tan
1818

1919
/**
2020
* Created by GBarbieri on 12.12.2016.

src/main/kotlin/glm_/glm.kt

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,18 @@ object glm :
6060

6161
random {
6262

63-
@JvmField val detail = Detail
64-
65-
@JvmField val PI = kotlin.math.PI
66-
@JvmField val PIf = kotlin.math.PI.f
67-
68-
@JvmField val epsilonF = 1.1920928955078125e-7f
69-
@JvmField val epsilon = 2.2204460492503131e-16
63+
@JvmField
64+
val detail = Detail
65+
66+
@JvmField
67+
val PI = kotlin.math.PI
68+
@JvmField
69+
val PIf = kotlin.math.PI.f
70+
71+
@JvmField
72+
val epsilonF = 1.1920928955078125e-7f
73+
@JvmField
74+
val epsilon = 2.2204460492503131e-16
7075
}
7176

7277
object Detail :
@@ -78,7 +83,8 @@ object Detail :
7883
class Java {
7984

8085
companion object {
81-
@JvmField val glm = Glm
86+
@JvmField
87+
val glm = Glm
8288
}
8389

8490
object Glm :
@@ -127,12 +133,17 @@ class Java {
127133

128134
random {
129135

130-
@JvmField val detail = Detail
136+
@JvmField
137+
val detail = Detail
131138

132-
@JvmField val PI = kotlin.math.PI
133-
@JvmField val PIf = kotlin.math.PI.f
139+
@JvmField
140+
val PI = kotlin.math.PI
141+
@JvmField
142+
val PIf = kotlin.math.PI.f
134143

135-
@JvmField val epsilonF = 1.1920928955078125e-7f
136-
@JvmField val epsilon = 2.2204460492503131e-16
144+
@JvmField
145+
val epsilonF = 1.1920928955078125e-7f
146+
@JvmField
147+
val epsilon = 2.2204460492503131e-16
137148
}
138149
}

src/main/kotlin/glm_/mat2x2/Mat2.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ data class Mat2(override var value: MutableList<Vec2>) : Mat2x2t<Vec2>(value) {
131131

132132

133133
companion object : mat2x2_operators {
134-
@JvmField val size = 2 * 2 * Float.BYTES
134+
@JvmField
135+
val size = 2 * 2 * Float.BYTES
135136
}
136137

137138

@@ -158,8 +159,8 @@ data class Mat2(override var value: MutableList<Vec2>) : Mat2x2t<Vec2>(value) {
158159

159160

160161
infix operator fun times(b: Mat2) = times(Mat2(), this, b)
161-
infix operator fun times(b: Mat3x2):Nothing = TODO()//times(TODO(), this, b)
162-
infix operator fun times(b: Mat4x2):Nothing = TODO()//times(TODO(), this, b)
162+
infix operator fun times(b: Mat3x2): Nothing = TODO()//times(TODO(), this, b)
163+
infix operator fun times(b: Mat4x2): Nothing = TODO()//times(TODO(), this, b)
163164

164165
operator fun times(b: Vec2) = times(Vec2(), this, b)
165166
infix operator fun times(b: Float) = times(Mat2(), this, b)

src/main/kotlin/glm_/mat2x2/Mat2d.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ data class Mat2d(override var value: MutableList<Vec2d>) : Mat2x2t<Vec2d>(value)
131131

132132

133133
companion object : mat2d_operators {
134-
@JvmField val size = 2 * 2 * Double.BYTES
134+
@JvmField
135+
val size = 2 * 2 * Double.BYTES
135136
}
136137

137138

0 commit comments

Comments
 (0)