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