matrix3 inverse
This commit is contained in:
parent
fa23c49e02
commit
4147663b4a
1 changed files with 4 additions and 0 deletions
|
@ -31,6 +31,9 @@ proc rotate*(angle: float32): Matrix3 =
|
||||||
proc scale*(x, y: float32): Matrix3 =
|
proc scale*(x, y: float32): Matrix3 =
|
||||||
cast[Matrix3](scale(vec2(x, y)))
|
cast[Matrix3](scale(vec2(x, y)))
|
||||||
|
|
||||||
|
proc inverse*(m: Matrix3): Matrix3 =
|
||||||
|
cast[Matrix3](inverse(cast[Mat3](m)))
|
||||||
|
|
||||||
proc parseColor*(s: string): Color {.raises: [PixieError]} =
|
proc parseColor*(s: string): Color {.raises: [PixieError]} =
|
||||||
try:
|
try:
|
||||||
result = parseHtmlColor(s)
|
result = parseHtmlColor(s)
|
||||||
|
@ -313,6 +316,7 @@ exportProcs:
|
||||||
translate(float32, float32)
|
translate(float32, float32)
|
||||||
rotate(float32)
|
rotate(float32)
|
||||||
scale(float32, float32)
|
scale(float32, float32)
|
||||||
|
inverse(Matrix3)
|
||||||
|
|
||||||
writeFiles("bindings/generated", "pixie")
|
writeFiles("bindings/generated", "pixie")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue