Permalink
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (18 sloc) 426 Bytes

Calculate a percentage value based on two given values.

percent( value1, value2 [, precision = 5] )

Parameters

  • value1 Number
  • value2 Number
  • precision Integer The number of decimal places to round to. Defaults to 5

Returns

value1 as a percentage of value2.

Examples

width: percent( 20, 960 );
width: 2.08333%;