Rational Struct
Namespace: Stride.Graphics
Assembly: Stride.Graphics.dll
Represents a rational number.
public struct Rational : IEquatable<Rational>
|
Improve this Doc
View Source
Constructors
Rational(Int32, Int32)
public Rational(int numerator, int denominator)
Parameters
Type |
Name |
Description |
System.Int32 |
numerator |
|
System.Int32 |
denominator |
|
|
Improve this Doc
View Source
Fields
Denominator
An unsigned integer value representing the bottom of the rational number.
Field Value
Type |
Description |
System.Int32 |
|
Numerator
An unsigned integer value representing the top of the rational number.
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Methods
Equals(Rational)
public bool Equals(Rational other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Equals(Object)
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.ValueType.Equals(System.Object)
GetHashCode()
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.ValueType.GetHashCode()
ToString()
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.ValueType.ToString()
|
Improve this Doc
View Source
Operators
Equality(Rational, Rational)
public static bool operator ==(Rational left, Rational right)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Inequality(Rational, Rational)
public static bool operator !=(Rational left, Rational right)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Extension Methods