Torque constructor
Torque({})
Class for torque conversions, e.g. if you want to convert 1 square meters in acres:
var torque = Torque(removeTrailingZeros: false);
torque.convert(Unit(TORQUE.square_meters, value: 1));
print(TORQUE.acres);
Implementation
Torque(
{this.significantFigures = 10,
this.removeTrailingZeros = true,
this.useScientificNotation = true,
name}) {
this.name = name ?? PROPERTY.torque;
size = TORQUE.values.length;
Node conversionTree = Node(name: TORQUE.newtonMeter, leafNodes: [
Node(
coefficientProduct: 1e-5,
name: TORQUE.dyneMeter,
),
Node(
coefficientProduct: 1.35581794902490555,
name: TORQUE.poundForceFeet,
),
Node(
coefficientProduct: 9.807,
name: TORQUE.kilogramForceMeter,
),
Node(
coefficientProduct: 0.138254954376,
name: TORQUE.poundalMeter,
),
]);
_customConversion = CustomConversion(
conversionTree: conversionTree,
mapSymbols: mapSymbols,
significantFigures: significantFigures,
removeTrailingZeros: removeTrailingZeros,
useScientificNotation: useScientificNotation);
}