Skip to content

Commit ad39d2c

Browse files
committed
vec1* comp obj
1 parent af4271b commit ad39d2c

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

src/main/kotlin/glm_/vec1/Vec1.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package glm_.vec1
22

3+
import glm_.BYTES
34
import glm_.f
45
import glm_.getFloat
56
import glm_.set
@@ -116,4 +117,11 @@ class Vec1(x: Float) : Vec1t<Float>(x) {
116117
0 -> x = s.f
117118
else -> throw ArrayIndexOutOfBoundsException()
118119
}
120+
121+
companion object {//TODO : vec2b_operators {
122+
@JvmField
123+
val length = 1
124+
@JvmField
125+
val size = length * Float.BYTES
126+
}
119127
}

src/main/kotlin/glm_/vec1/Vec1b.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,11 @@ class Vec1b(x: Byte) : Vec1t<Byte>(x) {
7878
0 -> x = s.b
7979
else -> throw ArrayIndexOutOfBoundsException()
8080
}
81+
82+
companion object {//TODO : vec2b_operators {
83+
@JvmField
84+
val length = 1
85+
@JvmField
86+
val size = length * Byte.BYTES
87+
}
8188
}

src/main/kotlin/glm_/vec1/Vec1i.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package glm_.vec1
22

3+
import glm_.BYTES
34
import glm_.getInt
45
import glm_.i
56
import glm_.vec2.Vec2bool
@@ -98,4 +99,11 @@ class Vec1i(x: Int) : Vec1t<Int>(x) {
9899
0 -> x = s.i
99100
else -> throw ArrayIndexOutOfBoundsException()
100101
}
102+
103+
companion object {//TODO : vec2b_operators {
104+
@JvmField
105+
val length = 1
106+
@JvmField
107+
val size = length * Int.BYTES
108+
}
101109
}

0 commit comments

Comments
 (0)