Skip to main content

Volume Conversion Methods

mlToLiters()​

Signature​

static mlToLiters(ml: number): number

Return Type​

number - Liters equivalent

Example​

Unit.mlToLiters(1000); // 1

litersToMl()​

Signature​

static litersToMl(l: number): number

Return Type​

number - Milliliters equivalent

Example​

Unit.litersToMl(1); // 1000

gallonsToMl()​

Signature​

static gallonsToMl(gal: number): number

Return Type​

number - Milliliters equivalent

Example​

Unit.gallonsToMl(1); // 3785.41

mlToGallons()​

Signature​

static mlToGallons(ml: number): number

Return Type​

number - Gallons equivalent

Example​

Unit.mlToGallons(3785.41); // 1

litersToGallons()​

Signature​

static litersToGallons(l: number): number

Return Type​

number - Gallons equivalent

Example​

Unit.litersToGallons(3.78541); // 1

gallonsToLiters()​

Signature​

static gallonsToLiters(gal: number): number

Return Type​

number - Liters equivalent

Example​

Unit.gallonsToLiters(1); // 3.78541