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

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

{
  "version": 3,
  "sources": ["../../../src/util/clamp.ts"],
  "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"],
  "mappings": "aAOA,MAAMA,EAAQ,CAACC,EAAaC,EAAaC,IAEjC,KAAK,IAAI,KAAK,IAAIF,EAAKC,CAAG,EAAG,KAAK,IAAIA,EAAKC,CAAG,CAAC,EAGvD,eAAeH",
  "names": ["clamp", "val", "min", "max"]
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy