You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
415 B
Kotlin

package me.eater.threedom.utils.joml
import org.joml.Matrix4d
import org.joml.Vector3d
fun <T : Number> Matrix4d.setTranslation(x: T, y: T, z: T): Matrix4d =
setTranslation(x.toDouble(), y.toDouble(), z.toDouble())
fun Matrix4d.getTranslation(): Vector3d = getTranslation(Vector3d())
@Suppress("FunctionName")
fun <T : Number> Vector3d(x: T, y: T, z: T) = Vector3d(x.toDouble(), y.toDouble(), z.toDouble())