Whats the difference between theese two java code snippets?
Posted
by
Joe Hopfgartner
on Stack Overflow
See other posts from Stack Overflow
or by Joe Hopfgartner
Published on 2011-01-06T02:49:53Z
Indexed on
2011/01/06
2:53 UTC
Read the original article
Hit count: 176
java
I have this code i am doing for university. The first code works as expected, the second one provides different results.
I can not see what they are doing differently??
first:
public Mat3 getNormalMatrix() {
return new Mat3(this.getInverseMatrix()).transpose();
}
second:
public Mat3 getNormalMatrix() {
Mat4 mat = this.getInverseMatrix();
Mat3 bla = new Mat3(mat);
bla.transpose();
return bla;
}
© Stack Overflow or respective owner