all files / chart/utils/ double-range.js

100% Statements 19/19
100% Branches 2/2
100% Functions 7/7
100% Lines 19/19
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47   46373× 46114× 46114×     259× 259×       64251×           64251×           37305×           25278×              
define(["require", "exports"], function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var DoubleRange = (function () {
        function DoubleRange(start, end) {
            if (start < end) {
                this.mStart = start;
                this.mEnd = end;
            }
            else {
                this.mStart = end;
                this.mEnd = start;
            }
        }
        Object.defineProperty(DoubleRange.prototype, "start", {
            get: function () {
                return this.mStart;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(DoubleRange.prototype, "end", {
            get: function () {
                return this.mEnd;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(DoubleRange.prototype, "delta", {
            get: function () {
                return (this.mEnd - this.mStart);
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(DoubleRange.prototype, "median", {
            get: function () {
                return this.mStart + (this.mEnd - this.mStart) / 2;
            },
            enumerable: true,
            configurable: true
        });
        return DoubleRange;
    }());
    exports.DoubleRange = DoubleRange;
});