Template:Cents

From Xenharmonic Wiki
(Redirected from User:Xenwolf/Template:Cents)
Jump to navigation Jump to search

This template calculates the cent value of its first argument (defaults to 1). An optional second argument controls the precision, it defaults to 0 decimal places.

Documentation


Documentation transcluded from /doc

Usage

Use this template like this

{cents|ratio|precision}}

Example

This input in the wiki source

{{cents|3/2|5}}

produces the following output

701.95500

Intervals can even be typed as evaluable mathematical expressions. For example:

{{cents|3^12/2^19|5}}

gives:

23.46001

See also