projects
/
org.ibex.core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
01732f3
)
added Affine.premultiply()
author
adam
<adam@megacz.com>
Mon, 19 Apr 2004 20:48:03 +0000
(20:48 +0000)
committer
adam
<adam@megacz.com>
Mon, 19 Apr 2004 20:48:03 +0000
(20:48 +0000)
darcs-hash:
20040419204803
-5007d-
966c5f959384553bfa0f91d6a6589c641634b7a8
.gz
src/org/ibex/graphics/Affine.java
patch
|
blob
|
history
diff --git
a/src/org/ibex/graphics/Affine.java
b/src/org/ibex/graphics/Affine.java
index
31e2e2b
..
1b47071
100644
(file)
--- a/
src/org/ibex/graphics/Affine.java
+++ b/
src/org/ibex/graphics/Affine.java
@@
-48,6
+48,18
@@
public final class Affine {
return this;
}
return this;
}
+ /** this = a * this */
+ public Affine premultiply(Affine A) {
+ float _a = A.a * this.a + A.b * this.c;
+ float _b = A.a * this.b + A.b * this.d;
+ float _c = A.c * this.a + A.d * this.c;
+ float _d = A.c * this.b + A.d * this.d;
+ float _e = A.e * this.a + A.f * this.c + this.e;
+ float _f = A.e * this.b + A.f * this.d + this.f;
+ a = _a; b = _b; c = _c; d = _d; e = _e; f = _f;
+ return this;
+ }
+
public void invert() {
float det = 1 / (a * d - b * c);
float _a = d * det;
public void invert() {
float det = 1 / (a * d - b * c);
float _a = d * det;