Struct ArcValue
The value of an arc
Implements
Namespace: Sartorius.SAF.Presentation.Controls.Shapes
Assembly: Sartorius.SAF.Presentation.Controls.dll
Syntax
[TypeConverter(typeof(ArcValueConverter))]
public struct ArcValue : IEquatable<ArcValue>
Constructors
View SourceArcValue(double)
Initializes a new instance of the ArcValue structure with the specified value in radian.
Declaration
public ArcValue(double value)
Parameters
| Type | Name | Description |
|---|---|---|
| double | value | The value. |
ArcValue(double, ArcUnit)
Initializes a new instance of the ArcValue structure with the specified value and unit.
Declaration
public ArcValue(double value, ArcUnit unit)
Parameters
| Type | Name | Description |
|---|---|---|
| double | value | The value. |
| ArcUnit | unit | The unit. |
Properties
View SourceUnit
Gets or sets the unit.
Declaration
public ArcUnit Unit { readonly get; set; }
Property Value
| Type | Description |
|---|---|
| ArcUnit |
Value
Gets or sets the value.
Declaration
public double Value { readonly get; set; }
Property Value
| Type | Description |
|---|---|
| double |
Methods
View SourceEquals(ArcValue)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(ArcValue other)
Parameters
| Type | Name | Description |
|---|---|---|
| ArcValue | other | An object to compare with this object. |
Returns
| Type | Description |
|---|---|
| bool | true if the current object is equal to the |
Equals(object)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare with the current instance. |
Returns
| Type | Description |
|---|---|
| bool | true if |
Overrides
View SourceFromDouble(double)
Converts the double to a ArcValue.
Declaration
public static ArcValue FromDouble(double value)
Parameters
| Type | Name | Description |
|---|---|---|
| double | value | The radian value of an arc. |
Returns
| Type | Description |
|---|---|
| ArcValue | An ArcValue representing the radian value. |
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
View SourceToDouble()
Converts this instance to a double.
Declaration
public readonly double ToDouble()
Returns
| Type | Description |
|---|---|
| double | The radian value of this instance. |
Operators
View Sourceoperator ==(ArcValue, ArcValue)
Compares the value of two ArcValue structures for equality.
Declaration
public static bool operator ==(ArcValue a, ArcValue b)
Parameters
| Type | Name | Description |
|---|---|---|
| ArcValue | a | The first structure to compare. |
| ArcValue | b | The second structure to compare. |
Returns
| Type | Description |
|---|---|
| bool | true if the two instances of ArcValue are equal; otherwise, false. |
implicit operator double(ArcValue)
Declaration
public static implicit operator double(ArcValue a)
Parameters
| Type | Name | Description |
|---|---|---|
| ArcValue | a | The ArcValue to convert. |
Returns
| Type | Description |
|---|---|
| double |
implicit operator ArcValue(double)
Declaration
public static implicit operator ArcValue(double d)
Parameters
| Type | Name | Description |
|---|---|---|
| double | d | The double to convert. |
Returns
| Type | Description |
|---|---|
| ArcValue |
operator !=(ArcValue, ArcValue)
Compares the value of two ArcValue structures for inequality.
Declaration
public static bool operator !=(ArcValue a, ArcValue b)
Parameters
| Type | Name | Description |
|---|---|---|
| ArcValue | a | The first structure to compare. |
| ArcValue | b | The second structure to compare. |
Returns
| Type | Description |
|---|---|
| bool | true if the two instances of ArcValue are not equal; otherwise, false. |