UNPKG

motor.js

Version:

A rendering Engine for the web.

33 lines (30 loc) 759 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); exports['default'] = { /** * [epsilon description] * @param {[type]} value [description] * @return {[type]} [description] */ epsilon: function epsilon(value) { return Math.abs(value) < 0.000001 ? 0 : value; }, /** * [determineLabel description] * @param {[type]} value [description] * @return {[type]} [description] */ applyCSSLabel: function applyCSSLabel(value, label) { if (value === 0) { return '0px'; } else if (label === '%') { return value * 100 + '%'; } else if (label === 'px') { return value + 'px'; } } }; module.exports = exports['default']; //# sourceMappingURL=Utility.js.map