ScalarSum.CheckForSameDefinition Method (Scalar) |
Checks to determine if another instance has the same definition as this instance and
returns
true if it does. Derived classes MUST override this method and check
all new fields introduced by the derived class for definitional equivalence. It is NOT necessary
to check base class fields because the base class will already have done that. When overriding this method,
you should NOT call the base implementation because it will return
false for all derived-class instances.
Derived classes should check the type of
other to preserve the symmetric nature of
IsSameDefinition(Object).
Namespace:
AGI.Foundation.Geometry
Assembly:
AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.3.420.0 (24.3.420.0)
Syntaxprotected override sealed bool CheckForSameDefinition(
Scalar other
)
Protected Overrides NotOverridable Function CheckForSameDefinition (
other As Scalar
) As Boolean
protected:
virtual bool CheckForSameDefinition(
Scalar^ other
) override sealed
abstract CheckForSameDefinition :
other : Scalar -> bool
override CheckForSameDefinition :
other : Scalar -> bool
Parameters
- other
- Type: AGI.Foundation.Geometry.Scalar
The other instance to compare to this one.
Return Value
Type:
Booleantrue if the two objects are defined equivalently; otherwise
false.
Remarks
Unfortunately summation of floating point values is not necessarily commutative, so a ScalarSum
representing a + b is not considered to have the same definition of a ScalarSum representing b + a.
See Also