Source
Point<num> transformPoint(math.Point<num> point, [Point<num> returnPoint]) { var px = point.x.toDouble(); var py = point.y.toDouble(); var tx = px * this.a + py * this.c + this.tx; var ty = px * this.b + py * this.d + this.ty; if (returnPoint is Point) { returnPoint.setTo(tx, ty); return returnPoint; } else { return new Point<num>(tx, ty); } }