Closed greatbullfrog closed 6 months ago
base
stands for SI unit. And the SI unit of area is the square meter. So the base scalar of any area is 1 square meter.
well... I didn't quite get it. I thought 'sqft' means "squre feet" and 1 m^2 should be 10.7639104 sqft, while "new Qty(1, 'm2').to('sqft').format()" doesn't give me the expected output. besides it seems "new Qty(1, 'm2').to('ft2').format()" works well
My bad, you're right. There seems to be a bug :bug:
> new Qty ("1m2").to("sqft")
Qty {
scalar: 1,
baseScalar: 1,
signature: 2,
_conversionCache: {},
numerator: [ '<sqft>' ],
denominator: [ '<1>' ],
initValue: { scalar: 1, numerator: [ '<sqft>' ], denominator: [ '<1>' ] },
_isBase: false,
_units: 'sqft'
}
The baseScalar
should be 1
but not the scalar
The base scalar of 'sqft' is 1 which I think it should be 0.3048*0.3048, and the following code returns '1 sqft':
new Qty(1, 'm2').to('sqft').format()