src/sap.m/src/sap/m/library.js
function(sPercentage, fBaseSize){
			if (typeof sPercentage !== "string") {
				Log.warning("sap.m.PopupHelper: calcPercentageSize, the first parameter" + sPercentage + "isn't with type string");
				return null;
			}

			if (sPercentage.indexOf("%") <= 0) {
				Log.warning("sap.m.PopupHelper: calcPercentageSize, the first parameter" + sPercentage + "is not a percentage string (for example '25%')");
				return null;
			}

			var fPercent = parseFloat(sPercentage) / 100,
				fParsedBaseSize = parseFloat(fBaseSize);

			return Math.floor(fPercent * fParsedBaseSize) + "px";
		}
function(sPercentage, fBaseSize){
			if (typeof sPercentage !== "string") {
				Log.warning("sap.m.PopupHelper: calcPercentageSize, the first parameter" + sPercentage + "isn't with type string");
				return null;
			}

			if (sPercentage.indexOf("%") <= 0) {
				Log.warning("sap.m.PopupHelper: calcPercentageSize, the first parameter" + sPercentage + "is not a percentage string (for example '25%')");
				return null;
			}

			var fPercent = parseFloat(sPercentage) / 100,
				fParsedBaseSize = parseFloat(fBaseSize);

			return Math.floor(fPercent * fParsedBaseSize) + "px";
		}
function ( sPercentage , fBaseSize ) { if ( typeof sPercentage !== "string" ) { Log . warning ( "sap.m.PopupHelper: calcPercentageSize, the first parameter" + sPercentage + "isn't with type string" ) ; return null ; } if ( sPercentage . indexOf ( "%" ) <= 0 ) { Log . warning ( "sap.m.PopupHelper: calcPercentageSize, the first parameter" + sPercentage + "is not a percentage string (for example '25%')" ) ; return null ; } var fPercent = parseFloat ( sPercentage ) / 100 , fParsedBaseSize = parseFloat ( fBaseSize ) ; return Math . floor ( fPercent * fParsedBaseSize ) + "px" ; }
Converts the given percentage value to an absolute number based on the given base size.

@param {string} sPercentage A percentage value in string format, for example "25%"
@param {float} fBaseSize A float number which the calculation is based on.
@returns {int} The calculated size string with "px" as unit or null when the format of given parameter is wrong.

@protected
Converts the given percentage value to an absolute number based on the given base size .