MCPcopy Create free account
hub / github.com/OpenIntroStat/ims / setPositiveNumber

Function setPositiveNumber

libs/jquery-3.5.1/jquery-3.5.1.js:6690–6700  ·  view source on GitHub ↗
( _elem, value, subtract )

Source from the content-addressed store, hash-verified

6688 };
6689
6690function setPositiveNumber( _elem, value, subtract ) {
6691
6692 // Any relative (+/-) values have already been
6693 // normalized at this point
6694 var matches = rcssNum.exec( value );
6695 return matches ?
6696
6697 // Guard against undefined "subtract", e.g., when used as in cssHooks
6698 Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
6699 value;
6700}
6701
6702function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
6703 var i = dimension === "width" ? 1 : 0,

Callers 1

jquery-3.5.1.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected