Point<num> transformPointInverse(Point<num> point, [ Point<num> returnPoint ])

Source

Point<num> transformPointInverse(math.Point<num> point, [Point<num> returnPoint]) {

  var px = point.x.toDouble();
  var py = point.y.toDouble();
  var tx = (this.d * (px - this.tx) - this.c * (py - this.ty)) / this.det;
  var ty = (this.a * (py - this.ty) - this.b * (px - this.tx)) / this.det;

  if (returnPoint is Point) {
    returnPoint.setTo(tx, ty);
    return returnPoint;
  } else {
    return new Point<num>(tx, ty);
  }
}