* 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)
| 20648 | * @private |
| 20649 | */ |
| 20650 | function _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 |