From a38834b81dee5c344fe1b2b7a2d8a9c722339cad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Tue, 26 Jan 2016 16:59:27 +0100 Subject: [PATCH] Further refined code from 095cd47c1c57fe16662621a844e89216b5d8311d --- src/basic/Matrix.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/basic/Matrix.js b/src/basic/Matrix.js index 1027623c..2c9bd5d1 100644 --- a/src/basic/Matrix.js +++ b/src/basic/Matrix.js @@ -567,13 +567,11 @@ var Matrix = Base.extend(/** @lends Matrix# */{ }, _transformCoordinates: function(src, dst, count) { - var i = 0, - max = 2 * count; - while (i < max) { + for (var i = 0, max = 2 * count; i < max; i += 2) { var x = src[i], - y = src[i+1]; - dst[i++] = x * this._a + y * this._b + this._tx; - dst[i++] = x * this._c + y * this._d + this._ty; + y = src[i + 1]; + dst[i] = x * this._a + y * this._b + this._tx; + dst[i + 1] = x * this._c + y * this._d + this._ty; } return dst; },