BaseEntry.ComUnits Method

Handles the units in result of an operation assuming that they must be the same in both its arguments (for example, when the operation is composition).
  • If both c1 and c2 have no units then does nothing.
  • If the units of c1 and c2 are the same and result is zero then does nothing.
  • If the units of c1 and c2 are the same and result is non-zero then sets Units in result.
  • If the units of c1 and c2 are different then throws GeneralException.

Definition

Namespace: SMath.Math.Numeric
Assembly: SMath.Math.Numeric (in SMath.Math.Numeric.dll) Version: 1.73.9126.0
C#
protected static void ComUnits(
	BaseEntry c1,
	BaseEntry c2,
	BaseEntry result
)

Parameters

c1  BaseEntry
First argument of operation.
c2  BaseEntry
Second argument of operation.
result  BaseEntry
Result of operation to set the units in.

Exceptions

GeneralExceptionThrown when the units in c1 and c2 do not match.

See Also