UNPKG

igniteui-angular-gauges

Version:

Ignite UI Angular gauge components.

67 lines (66 loc) 2.23 kB
/* 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, markType } from "igniteui-angular-core"; /** * @hidden */ var LinearGraphScaler = /** @class */ /*@__PURE__*/ (function (_super) { __extends(LinearGraphScaler, _super); function LinearGraphScaler(a, b, c, d, e) { var _this = _super.call(this) || this; _this.f = 0; _this.e = 0; _this.d = 0; _this.c = 0; _this.a = false; _this.g = 0; _this.b = 0; _this.f = c; _this.e = d; _this.a = e; _this.d = a; _this.c = b; _this.g = c; _this.b = d; return _this; } Object.defineProperty(LinearGraphScaler.prototype, "j", { get: function () { return this.g; }, enumerable: false, configurable: true }); Object.defineProperty(LinearGraphScaler.prototype, "h", { get: function () { return this.b; }, enumerable: false, configurable: true }); LinearGraphScaler.prototype.i = function (a) { var b = (a - this.d) / (this.c - this.d); if (this.a) { b = 1 - b; } var c = this.g + (this.b - this.g) * b; c = Math.round(c * 100) / 100; return c; }; LinearGraphScaler.prototype.k = function (a) { var b = (a - this.g) / (this.b - this.g); if (this.a) { b = 1 - b; } var c = this.d + (this.c - this.d) * b; return c; }; LinearGraphScaler.$t = markType(LinearGraphScaler, 'LinearGraphScaler'); return LinearGraphScaler; }(Base)); export { LinearGraphScaler };