Table of Contents

Struct AreaValue

Namespace
xFunc.Maths.Expressions.Units.AreaUnits
Assembly
xFunc.Maths.dll

Represents a number with unit.

public readonly struct AreaValue : IEquatable<AreaValue>, IComparable<AreaValue>, IComparable
Implements
Inherited Members

Constructors

AreaValue(NumberValue, AreaUnit)

Initializes a new instance of the AreaValue struct.

public AreaValue(NumberValue value, AreaUnit unit)

Parameters

value NumberValue

The value.

unit AreaUnit

The unit of number.

Properties

Sign

Gets an integer that indicates the sign of a double-precision floating-point number.

public double Sign { get; }

Property Value

double

Unit

Gets a unit.

public AreaUnit Unit { get; }

Property Value

AreaUnit

Value

Gets a value.

public NumberValue Value { get; }

Property Value

NumberValue

Methods

Abs(AreaValue)

Returns the absolute value of a specified value.

public static AreaValue Abs(AreaValue value)

Parameters

value AreaValue

The value.

Returns

AreaValue

The power value, x, that such that 0 ≤ xMaxValue.

Acre(double)

Creates the AreaValue struct with Acre unit.

public static AreaValue Acre(double value)

Parameters

value double

The value.

Returns

AreaValue

The area value.

Acre(NumberValue)

Creates the AreaValue struct with Acre unit.

public static AreaValue Acre(NumberValue value)

Parameters

value NumberValue

The value.

Returns

AreaValue

The area value.

AsExpression()

Converts AreaValue to Area.

public Area AsExpression()

Returns

Area

The area number.

Ceiling(AreaValue)

Returns the smallest integral value that is greater than or equal to the specified value.

public static AreaValue Ceiling(AreaValue value)

Parameters

value AreaValue

The value.

Returns

AreaValue

The smallest integral value.

Centimeter(double)

Creates the AreaValue struct with Centimeter unit.

public static AreaValue Centimeter(double value)

Parameters

value double

The value.

Returns

AreaValue

The area value.

Centimeter(NumberValue)

Creates the AreaValue struct with Centimeter unit.

public static AreaValue Centimeter(NumberValue value)

Parameters

value NumberValue

The value.

Returns

AreaValue

The area value.

CompareTo(object?)

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(object? obj)

Parameters

obj object

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:

Value Meaning
Less than zero This instance precedes obj in the sort order.
Zero This instance occurs in the same position in the sort order as obj.
Greater than zero This instance follows obj in the sort order.

Exceptions

ArgumentException

obj is not the same type as this instance.

CompareTo(AreaValue)

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(AreaValue other)

Parameters

other AreaValue

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:

Value Meaning
Less than zero This instance precedes other in the sort order.
Zero This instance occurs in the same position in the sort order as other.
Greater than zero This instance follows other in the sort order.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

Equals(AreaValue)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(AreaValue other)

Parameters

other AreaValue

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Floor(AreaValue)

Returns the largest integral value less than or equal to the specified value number.

public static AreaValue Floor(AreaValue value)

Parameters

value AreaValue

The value.

Returns

AreaValue

The largest integral value.

Foot(double)

Creates the AreaValue struct with Foot unit.

public static AreaValue Foot(double value)

Parameters

value double

The value.

Returns

AreaValue

The area value.

Foot(NumberValue)

Creates the AreaValue struct with Foot unit.

public static AreaValue Foot(NumberValue value)

Parameters

value NumberValue

The value.

Returns

AreaValue

The area value.

Frac(AreaValue)

Returns the fractional part of the value number.

public static AreaValue Frac(AreaValue value)

Parameters

value AreaValue

The value number.

Returns

AreaValue

The fractional part.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Hectare(double)

Creates the AreaValue struct with Hectare unit.

public static AreaValue Hectare(double value)

Parameters

value double

The value.

Returns

AreaValue

The area value.

Hectare(NumberValue)

Creates the AreaValue struct with Hectare unit.

public static AreaValue Hectare(NumberValue value)

Parameters

value NumberValue

The value.

Returns

AreaValue

The area value.

Inch(double)

Creates the AreaValue struct with Inch unit.

public static AreaValue Inch(double value)

Parameters

value double

The value.

Returns

AreaValue

The area value.

Inch(NumberValue)

Creates the AreaValue struct with Inch unit.

public static AreaValue Inch(NumberValue value)

Parameters

value NumberValue

The value.

Returns

AreaValue

The area value.

Kilometer(double)

Creates the AreaValue struct with Kilometer unit.

public static AreaValue Kilometer(double value)

Parameters

value double

The value.

Returns

AreaValue

The area value.

Kilometer(NumberValue)

Creates the AreaValue struct with Kilometer unit.

public static AreaValue Kilometer(NumberValue value)

Parameters

value NumberValue

The value.

Returns

AreaValue

The area value.

Meter(double)

Creates the AreaValue struct with Meter unit.

public static AreaValue Meter(double value)

Parameters

value double

The value.

Returns

AreaValue

The area value.

Meter(NumberValue)

Creates the AreaValue struct with Meter unit.

public static AreaValue Meter(NumberValue value)

Parameters

value NumberValue

The value.

Returns

AreaValue

The area value.

Mile(double)

Creates the AreaValue struct with Mile unit.

public static AreaValue Mile(double value)

Parameters

value double

The value.

Returns

AreaValue

The area value.

Mile(NumberValue)

Creates the AreaValue struct with Mile unit.

public static AreaValue Mile(NumberValue value)

Parameters

value NumberValue

The value.

Returns

AreaValue

The area value.

Millimeter(double)

Creates the AreaValue struct with Millimeter unit.

public static AreaValue Millimeter(double value)

Parameters

value double

The value.

Returns

AreaValue

The area value.

Millimeter(NumberValue)

Creates the AreaValue struct with Millimeter unit.

public static AreaValue Millimeter(NumberValue value)

Parameters

value NumberValue

The value.

Returns

AreaValue

The area value.

Round(AreaValue, NumberValue)

Rounds a double-precision floating-point value to a specified number of fractional digits, and uses the specified rounding convention for midpoint values.

public static AreaValue Round(AreaValue areaValue, NumberValue digits)

Parameters

areaValue AreaValue

The number.

digits NumberValue

The number of fractional digits in the return value.

Returns

AreaValue

The number nearest to areaValue that has a number of fractional digits equal to digits. If value has fewer fractional digits than digits, areaValue is returned unchanged.

To(AreaUnit)

Convert to the newUnit unit.

public AreaValue To(AreaUnit newUnit)

Parameters

newUnit AreaUnit

The new unit.

Returns

AreaValue

The value in the new unit.

ToAcre()

Converts the value to the acre unit.

public AreaValue ToAcre()

Returns

AreaValue

The value in mile unit.

ToCentimeter()

Converts the value to the centimeter unit.

public AreaValue ToCentimeter()

Returns

AreaValue

The value in centimeter unit.

ToFoot()

Converts the value to the foot unit.

public AreaValue ToFoot()

Returns

AreaValue

The value in foot unit.

ToHectare()

Converts the value to the hectare unit.

public AreaValue ToHectare()

Returns

AreaValue

The value in mile unit.

ToInch()

Converts the value to the inch unit.

public AreaValue ToInch()

Returns

AreaValue

The value in inch unit.

ToKilometer()

Converts the value to the kilometer unit.

public AreaValue ToKilometer()

Returns

AreaValue

The value in kilometer unit.

ToMeter()

Converts the value to the meter unit.

public AreaValue ToMeter()

Returns

AreaValue

The value in meter unit.

ToMile()

Converts the value to the mile unit.

public AreaValue ToMile()

Returns

AreaValue

The value in mile unit.

ToMillimeter()

Converts the value to the millimeter unit.

public AreaValue ToMillimeter()

Returns

AreaValue

The value in millimeter unit.

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

ToYard()

Converts the value to the yard unit.

public AreaValue ToYard()

Returns

AreaValue

The value in yard unit.

Truncate(AreaValue)

Calculates the integral part of a specified value number.

public static AreaValue Truncate(AreaValue value)

Parameters

value AreaValue

An value to truncate.

Returns

AreaValue

The integral part of value number.

Yard(double)

Creates the AreaValue struct with Yard unit.

public static AreaValue Yard(double value)

Parameters

value double

The value.

Returns

AreaValue

The area value.

Yard(NumberValue)

Creates the AreaValue struct with Yard unit.

public static AreaValue Yard(NumberValue value)

Parameters

value NumberValue

The value.

Returns

AreaValue

The area value.

Operators

operator +(AreaValue, AreaValue)

Adds two objects of AreaValue.

public static AreaValue operator +(AreaValue left, AreaValue right)

Parameters

left AreaValue

The first object to add.

right AreaValue

The second object to add.

Returns

AreaValue

An object that is the sum of left and right.

operator ==(AreaValue, AreaValue)

Determines whether two specified instances of AreaValue are equal.

public static bool operator ==(AreaValue left, AreaValue right)

Parameters

left AreaValue

The first object to compare.

right AreaValue

The second object to compare.

Returns

bool

true if left is equal to right; otherwise, false.

operator >(AreaValue, AreaValue)

Indicates whether left parameter is greater than the right parameter.

public static bool operator >(AreaValue left, AreaValue right)

Parameters

left AreaValue

The left value.

right AreaValue

The right value.

Returns

bool

true if the left parameter is greater than the right parameter; otherwise, false.

operator >=(AreaValue, AreaValue)

Indicates whether left parameter is greater than or equal to the right parameter.

public static bool operator >=(AreaValue left, AreaValue right)

Parameters

left AreaValue

The left value.

right AreaValue

The right value.

Returns

bool

true if the left parameter is greater than or equal to the right parameter; otherwise, false.

operator !=(AreaValue, AreaValue)

Determines whether two specified instances of AreaValue are equal.

public static bool operator !=(AreaValue left, AreaValue right)

Parameters

left AreaValue

The first object to compare.

right AreaValue

The second object to compare.

Returns

bool

true if left is equal to right; otherwise, false.

operator <(AreaValue, AreaValue)

Indicates whether left parameter is less than the right parameter.

public static bool operator <(AreaValue left, AreaValue right)

Parameters

left AreaValue

The left value.

right AreaValue

The right value.

Returns

bool

true if the left parameter is less than the right parameter; otherwise, false.

operator <=(AreaValue, AreaValue)

Indicates whether left parameter is less than or equal to the right parameter.

public static bool operator <=(AreaValue left, AreaValue right)

Parameters

left AreaValue

The left value.

right AreaValue

The right value.

Returns

bool

true if the left parameter is less than or equal to the right parameter; otherwise, false.

operator -(AreaValue, AreaValue)

Subtracts two objects of AreaValue.

public static AreaValue operator -(AreaValue left, AreaValue right)

Parameters

left AreaValue

The first object to sub.

right AreaValue

The second object to sub.

Returns

AreaValue

An object that is the difference of left and right.

operator -(AreaValue)

Produces the negative of AreaValue.

public static AreaValue operator -(AreaValue value)

Parameters

value AreaValue

The value.

Returns

AreaValue

The negative of value.