VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /var/www/html/libs/absol-full/dist/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/libs/absol-full/dist/js/mdls__absol__src__Math__Arc.js
/*** module: node_modules/absol/src/Math/Arc.js ***/
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _Vec = _interopRequireDefault(require("./Vec2"));

var _int = require("./int");


function Arc(x, y, r, start, end) {
  this.x = x;
  this.y = y;
  this.r = r;
  this.start = start;
  this.end = end;
}

Arc.prototype.isPointInBound = function (p) {
  if ((0, _int.distance)(this.x, this.y, p.x, p.y) > r) return false;
  return (0, _int.radianInRange)(Math.atan2(p.y - this.y, p.x - this.x), start, end);
};

Arc.prototype.isRectInBound = function (rect) {
  return this.isPointInBound(rect.A()) && this.isPointInBound(rect.B()) && this.isPointInBound(rect.C()) && this.isPointInBound(rect.D());
};

Arc.prototype.isRectOutBound = function (rect) {
  return !this.isPointInBound(rect.A()) && !this.isPointInBound(rect.B()) && !this.isPointInBound(rect.C()) && !this.isPointInBound(rect.D());
};

Arc.prototype.isRectCollapse = function (rect) {
  return this.isPointInBound(rect.A()) || this.isPointInBound(rect.B()) || this.isPointInBound(rect.C()) || this.isPointInBound(rect.D());
};

Arc.prototype.centerPoint = function () {
  var mid = (this.start + this.end) / 2;
  var x = this.x + Math.cos(mid) * this.r * 2 / 3;
  var y = this.y + Math.sin(mid) * this.r * 2 / 3;
  return new _Vec.default(x, y);
};

Arc.prototype.centerRoundPoint = function () {
  var mid = (this.start + this.end) / 2;
  var x = this.x + Math.cos(mid) * this.r;
  var y = this.y + Math.sin(mid) * this.r;
  return new _Vec.default(x, y);
};

Arc.make = function (x, y, r, start, end) {
  return new Arc(x, y, r, start, end);
};

var _default = Arc;
exports.default = _default;

VaKeR 2022