Skip to content

Commit 11ff45e

Browse files
committed
vec2i ushr
1 parent 8ccf640 commit 11ff45e

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/main/kotlin/glm_/vec2/Vec2i.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,10 @@ class Vec2i(x: Int, y: Int) : Vec2t<Int>(x, y) {
367367
fun shr_(bX: Int, bY: Int) = shr(this, this, bX, bY)
368368

369369

370+
// TODO fill & others
371+
infix fun ushr(b: Int) = ushr(Vec2i(), this, b, b)
372+
373+
370374
@JvmOverloads
371375
fun inv(res: Vec2i = Vec2i()) = inv(res, this)
372376

src/main/kotlin/glm_/vec2/operators/vec2i_operators.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,13 @@ interface vec2i_operators {
9191
return res
9292
}
9393

94+
// TODO others
95+
fun ushr(res: Vec2i, a: Vec2i, bX: Int, bY: Int): Vec2i {
96+
res.x = a.x ushr bX
97+
res.y = a.y ushr bY
98+
return res
99+
}
100+
94101
fun inv(res: Vec2i, a: Vec2i): Vec2i {
95102
res.x = a.x.inv()
96103
res.y = a.y.inv()

0 commit comments

Comments
 (0)