Update vmath dep.

This commit is contained in:
treeform 2020-11-21 20:23:15 -08:00
parent f7ab97ae87
commit 7e43a91a2b
2 changed files with 1 additions and 15 deletions

View file

@ -6,7 +6,7 @@ license = "MIT"
srcDir = "src"
requires "nim >= 1.2.6"
requires "vmath >= 0.3.2"
requires "vmath >= 0.3.3"
requires "chroma >= 0.1.5"
requires "zippy >= 0.3.5"
requires "flatty >= 0.1.2"

View file

@ -143,20 +143,6 @@ proc hasEffect*(blendMode: BlendMode, rgba: ColorRGBA): bool =
else:
rgba.a > 0
# TODO: Move this to vmath.
func translate*(v: Vec2): Mat3 =
result[0, 0] = 1
result[1, 1] = 1
result[2, 0] = v.x
result[2, 1] = v.y
result[2, 2] = 1
# TODO: Move this to vmath.
func scale*(v: Vec2): Mat3 =
result[0, 0] = v.x
result[1, 1] = v.y
result[2, 2] = 1
proc fraction(v: float32): float32 =
result = abs(v)
result = result - floor(result)