Skip to content

v0.2.7

Choose a tag to compare

@Kright Kright released this 13 Oct 10:16
· 339 commits to master since this release

Add swizzle operators for Vectors.

import com.kright.math.{Vector3d, Vector4d}

val v = Vector4d(1, 2, 3, 4)
v.yx = v.xy
// v == (2, 1, 3, 4)
v.xy = v.yx
// v == (1, 2, 3, 4)
v = Vector3d(1, 2, 3).xyzz
// v == (1, 2, 3, 3)