igniteui-react-core
Version:
Ignite UI React Core.
69 lines (68 loc) • 2.67 kB
JavaScript
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { __extends } from "tslib";
import { Base, Point_$type, markType } from "./type";
/**
* @hidden
*/
var LineEquation = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(LineEquation, _super);
function LineEquation(a) {
var _rest = [];
for (var _i = 1; _i < arguments.length; _i++) {
_rest[_i - 1] = arguments[_i];
}
var _this = _super.call(this) || this;
_this.a = false;
_this.e = 0;
_this.g = null;
_this.f = null;
_this.b = 0;
_this.c = 0;
_this.d = 0;
a = (a == void 0) ? 0 : a;
switch (a) {
case 0:
{
var c = _rest[0];
var d = _rest[1];
var e = _rest[2];
var f = _rest[3];
var g = [{ $type: Point_$type, x: c, y: d }, { $type: Point_$type, x: e, y: f }];
{
var i = g[0];
var j = g[1];
_this.g = i;
_this.f = j;
_this.e = (_this.f.y - _this.g.y) / (_this.f.x - _this.g.x);
_this.b = -_this.e;
_this.c = 1;
_this.d = _this.g.y - _this.e * _this.g.x;
_this.a = Math.abs(_this.f.x - _this.g.x) < 9.9999997473787516E-06;
}
}
break;
case 1:
{
var c = _rest[0];
var d = _rest[1];
_this.g = c;
_this.f = d;
_this.e = (_this.f.y - _this.g.y) / (_this.f.x - _this.g.x);
_this.b = -_this.e;
_this.c = 1;
_this.d = _this.g.y - _this.e * _this.g.x;
_this.a = Math.abs(_this.f.x - _this.g.x) < 9.9999997473787516E-06;
}
break;
}
return _this;
}
LineEquation.$t = markType(LineEquation, 'LineEquation');
return LineEquation;
}(Base));
export { LineEquation };