Sha256: 4e9e22412a24cb3efd75f00f4f4e4fd1beaa3c145d41a192460af811724c8d69

Contents?: true

Size: 418 Bytes

Versions: 5

Compression:

Stored size: 418 Bytes

Contents

var Dimension = require("../tree/dimension");

var MathHelper = function() {
};
MathHelper._math = function (fn, unit, n) {
    if (!(n instanceof Dimension)) {
        throw { type: "Argument", message: "argument must be a number" };
    }
    if (unit == null) {
        unit = n.unit;
    } else {
        n = n.unify();
    }
    return new Dimension(fn(parseFloat(n.value)), unit);
};
module.exports = MathHelper;

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
ilog-0.4.1 node_modules/less/lib/less/functions/math-helper.js
ilog-0.4.0 node_modules/less/lib/less/functions/math-helper.js
ilog-0.3.3 node_modules/less/lib/less/functions/math-helper.js
less-execjs-2.6.0.4 lib/less/js/less/lib/less/functions/math-helper.js
less-execjs-2.6.0.3 lib/less/js/less/lib/less/functions/math-helper.js