Force constructor
Class for force conversions, e.g. if you want to convert 1 newton in pound force:
var force = Force(removeTrailingZeros: false);
force.Convert(Unit(FORCE.newton, value: 1));
print(FORCE.pound_force);
Implementation
Force({this.significantFigures = 10, this.removeTrailingZeros = true, name}) {
size = FORCE.values.length;
this.name = name ?? PROPERTY.force;
for (FORCE val in FORCE.values) {
unitList.add(Unit(val, symbol: mapSymbols[val]));
}
unitConversion = Node(name: FORCE.newton, leafNodes: [
Node(
coefficientProduct: 1e-5,
name: FORCE.dyne,
),
Node(
coefficientProduct: 4.4482216152605,
name: FORCE.poundForce,
),
Node(
coefficientProduct: 9.80665,
name: FORCE.kilogramForce,
),
Node(
coefficientProduct: 0.138254954376,
name: FORCE.poundal,
),
]);
}