All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.util.clamp.js.map Maven / Gradle / Ivy

{"version":3,"file":"clamp.js","sourceRoot":"","sources":["../../src/util/clamp.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,GAAW,EAAE,EAAE;IACvD,8BAA8B;IAC9B,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AACzD,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC","sourcesContent":["/**\n * Returns a value clamped between an upper bound 'max' and lower bound 'min'.\n * @param {number} val value\n * @param {number} min lower bound\n * @param {number} max upper bound\n * @returns {number}\n */\nconst clamp = (val: number, min: number, max: number) => {\n\t// handles case when max < min\n\treturn Math.min(Math.max(val, min), Math.max(min, max));\n};\n\nexport default clamp;\n"]}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy