MCPcopy Create free account
hub / github.com/Code-Bullet/Jump-King / _sAssign

Function _sAssign

libraries/p5.js:20650–20657  ·  view source on GitHub ↗

* Validates clipping params. Per drawImage spec sWidth and sHight cannot be * negative or greater than image intrinsic width and height * @private * @param {Number} sVal * @param {Number} iVal * @returns {Number} * @private

(sVal, iVal)

Source from the content-addressed store, hash-verified

20648 * @private
20649 */
20650function _sAssign(sVal, iVal) {
20651 if (sVal > 0 && sVal < iVal) {
20652 return sVal;
20653 }
20654 else {
20655 return iVal;
20656 }
20657}
20658
20659/**
20660 * Draw an image to the main canvas of the p5js sketch

Callers 1

p5.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected