|
@ -67,12 +67,7 @@ class Database extends NodeBase { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
distanceToBorder(ctx, angle) { |
|
|
distanceToBorder(ctx, angle) { |
|
|
this.resize(ctx); |
|
|
|
|
|
var a = this.width / 2; |
|
|
|
|
|
var b = this.height / 2; |
|
|
|
|
|
var w = (Math.sin(angle) * a); |
|
|
|
|
|
var h = (Math.cos(angle) * b); |
|
|
|
|
|
return a * b / Math.sqrt(w * w + h * h); |
|
|
|
|
|
|
|
|
return this._distanceToBorder(ctx,angle); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|