Skip to content

Commit 8ccf640

Browse files
committed
log2(a: Int)
1 parent 4feb7bb commit 8ccf640

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

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

3+
import glm_.d
4+
import glm_.i
35
import glm_.vec2.Vec2
46
import glm_.vec2.Vec2d
57
import glm_.vec3.Vec3
@@ -212,6 +214,7 @@ interface func_exponential {
212214

213215
fun log2(a: Double) = _log2(a)
214216
fun log2(a: Float) = _log2(a)
217+
fun log2(a: Int) = _log2(a.d).i
215218

216219
fun log2(a: Vec2, res: Vec2 = Vec2()) {
217220
res.x = log2(a.x)

0 commit comments

Comments
 (0)