svnno****@sourc*****
svnno****@sourc*****
2009年 5月 12日 (火) 22:50:57 JST
Revision: 1160 http://svn.sourceforge.jp/view?root=sie&view=rev&rev=1160 Author: dhrname Date: 2009-05-12 22:50:57 +0900 (Tue, 12 May 2009) Log Message: ----------- Matrixのmultiplyメソッドの整理 Modified Paths: -------------- branches/04x/047/sie.js Modified: branches/04x/047/sie.js =================================================================== --- branches/04x/047/sie.js 2009-05-11 14:22:42 UTC (rev 1159) +++ branches/04x/047/sie.js 2009-05-12 13:50:57 UTC (rev 1160) @@ -1494,13 +1494,7 @@ } //Matrix同士の積を算出 Matrix.prototype.multiply = function matrixmultiply( /*Matrix*/ m) { - var a = this.a * m.a + this.c * m.b; - var b = this.b * m.a + this.d * m.b; - var c = this.a * m.c + this.c * m.d; - var d = this.b * m.c + this.d * m.d; - var e = this.a * m.e + this.c * m.f + this.e; - var f = this.b * m.e + this.d * m.f + this.f; - var s = new Matrix(a,b,c,d,e,f); + var s = new Matrix(this.a * m.a + this.c * m.b,this.b * m.a + this.d * m.b,this.a * m.c + this.c * m.d,this.b * m.c + this.d * m.d,this.a * m.e + this.c * m.f + this.e,this.b * m.e + this.d * m.f + this.f); return s; } //行列式