|
@@ -208,8 +208,9 @@ class Matrix {
|
|
Returns a Point with a total scaling applied by the Matrix.
|
|
Returns a Point with a total scaling applied by the Matrix.
|
|
@param p Optional Point instance. If provided, sets values of given Point and returns it. Otherwise returns new Point instance.
|
|
@param p Optional Point instance. If provided, sets values of given Point and returns it. Otherwise returns new Point instance.
|
|
**/
|
|
**/
|
|
- public inline function getScale() {
|
|
|
|
- var p = new h2d.col.Point();
|
|
|
|
|
|
+ public inline function getScale(p: h2d.col.Point = null) {
|
|
|
|
+ if (p == null)
|
|
|
|
+ p = new h2d.col.Point();
|
|
p.x = Math.sqrt(a * a + b * b);
|
|
p.x = Math.sqrt(a * a + b * b);
|
|
p.y = Math.sqrt(c * c + d * d);
|
|
p.y = Math.sqrt(c * c + d * d);
|
|
if( getDeterminant() < 0 ) {
|
|
if( getDeterminant() < 0 ) {
|