Class Numeric

Class Numeric

Namespace: Aspose.Html.Drawing
Assembly: Aspose.HTML.dll (25.2.0)

Provides the base class for numeric types.

[ComVisible(true)]
public abstract class Numeric : Unit, IEquatable<unit>

Inheritance

objectUnitNumeric

Derived

Dimension

Implements

IEquatable<unit>

Inherited Members

Unit.Equals(Unit), Unit.Equals(object), Unit.GetHashCode(), Unit.ToString(), Unit.FromCentimeters(double), Unit.FromMillimeters(double), Unit.FromQuarterMillimeters(double), Unit.FromInches(double), Unit.FromPicas(double), Unit.FromPoints(double), Unit.FromPixels(double), Unit.FromDegrees(double), Unit.FromGradians(double), Unit.FromRadians(double), Unit.FromTurns(double), Unit.FromSeconds(double), Unit.FromMilliseconds(double), Unit.FromHertz(double), Unit.FromKiloHertz(double), Unit.FromDotsPerInch(double), Unit.FromDotsPerCentimeters(double), Unit.FromDotsPerPixel(double), Unit.UnitType, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Methods

CompareTo(Numeric)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(Numeric other)

Parameters

other Numeric

The other object to compare.

Returns

int

A value that indicates the relative order of the objects being compared.

Exceptions

ArgumentNullException

other

ArgumentException

Equals(Unit)

Determines whether the specified Aspose.Html.Drawing.Unit, is equal to this instance.

public override bool Equals(Unit other)

Parameters

other Unit

The Aspose.Html.Drawing.Unit to compare with this instance.

Returns

bool

true if the specified Aspose.Html.Drawing.Unit is equal to this instance; otherwise, false.

GetHashCode()

Returns a hash code for this instance.

public override int GetHashCode()

Returns

int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

GetValue()

Gets the unit value.

public double GetValue()

Returns

double

The object value.

GetValue(UnitType)

Gets the value converted to the specified Aspose.Html.Drawing.UnitType.

public double GetValue(UnitType unitType)

Parameters

unitType UnitType

Type of the unit.

Returns

double

Returns value that is converted to specified type.

Exceptions

ArgumentNullException

unitType

OnConvert(double, UnitType, UnitType)

Called when unit is converted to the specified unit type.

protected abstract double OnConvert(double value, UnitType fromType, UnitType toType)

Parameters

value double

The value.

fromType UnitType

From unit type.

toType UnitType

To unit type.

Returns

double

Returns value that is converted to specified type.

ToString()

Returns a System.String that represents this instance.

public override string ToString()

Returns

string

A System.String that represents this instance. </unit>