
Matrix and vector operations optimized for WebGPU, offering comprehensive vector and quaternion math with immutable and mutable variants, ideal for cross-platform applications.
Kotlin Multiplatform matrix implementation for WebGPU, inspired by wgpu-matrix. This library provides a comprehensive set of matrix and vector operations optimized for WebGPU applications across multiple platforms.
In build.gradle(.kts):
repositories {
implementation("io.github.natanfudge:wgpu4k-matrix:<SEE-LATEST-VERSION-IN-BADGE>")
}In code:
// Example matrix operations
val mat4 = Mat4f.identity()
val rotated = mat4.rotateX(Math.PI / 4)
val transformed = rotated.translate(Vec3f(1.0, 2.0, 3.0))
// Vector operations
val vec4 = Vec4f(1.0, 0.0, 0.0, 1.0)
val normalized = vec4.normalize()Kotlin Multiplatform matrix implementation for WebGPU, inspired by wgpu-matrix. This library provides a comprehensive set of matrix and vector operations optimized for WebGPU applications across multiple platforms.
In build.gradle(.kts):
repositories {
implementation("io.github.natanfudge:wgpu4k-matrix:<SEE-LATEST-VERSION-IN-BADGE>")
}In code:
// Example matrix operations
val mat4 = Mat4f.identity()
val rotated = mat4.rotateX(Math.PI / 4)
val transformed = rotated.translate(Vec3f(1.0, 2.0, 3.0))
// Vector operations
val vec4 = Vec4f(1.0, 0.0, 0.0, 1.0)
val normalized = vec4.normalize()