You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This currently produces an error because UnitForce already conforms to UnitProduct for force = mass × acceleration and we cannot add another conformance to the same protocol:
/// Pressure = Force / Area ⇔ Force = Pressure * Area/// 1 Pa = 1 N / 1 m²extensionUnitForce:UnitProduct{publictypealiasFactor1=UnitPressurepublictypealiasFactor2=UnitAreapublictypealiasProduct=UnitForcepublicstaticfunc defaultUnitMapping()->(Factor1,Factor2,Product){return(.newtonsPerMetersSquared,.squareMeters,.newtons)}}
Is it necessary to introduce another protocol (like UnitRatio) for this?
The text was updated successfully, but these errors were encountered:
This currently produces an error because
UnitForce
already conforms toUnitProduct
for force = mass × acceleration and we cannot add another conformance to the same protocol:Is it necessary to introduce another protocol (like
UnitRatio
) for this?The text was updated successfully, but these errors were encountered: