Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Struct

Single

struct float

Module: System
Assembly: System.Runtime.dll
Source file: Single.rvn

Inheritance: Object → ValueType → Single
Implements: EquatableTo<Single>, Formattable, Number

A single-precision floating-point value.

Constants

3 items
Static member: NaN: float Represents an IEEE not-a-number value. Use IsNaN to test for any NaN.
Static member: NegativeInfinity: float Represents negative infinity.
Static member: PositiveInfinity: float Represents positive infinity.

Properties

2 items
Static member: One: float Development: gets one for this numeric type.
Static member: Zero: float Development: gets zero for this numeric type.

Methods

16 items
CompareTo(other: Self) -> int Compares this value with the other value; returns a negative integer, zero or a positive integer for less than, equal to or greater than. Required implementation (no default). Defined by ComparableTo<Self>.CompareTo · Defined by ComparableTo<Self>.CompareTo
CompareTo(other: float) -> int Compares this value with the other value; returns a negative integer, zero or a positive integer for less than, equal to or greater than.
Equals(other: float) -> bool Tests value equality; NaNs compare equal and signed zeros compare equal. Implements EquatableTo<Single>.Equals
Equals(other: object?) -> bool Tests reference identity by default; an ordinary class may override equality. Inherited from Object.Equals
GetHashCode() -> int Returns a stable identity hash by default; an ordinary class may override it consistently with equality. Inherited from Object.GetHashCode
GetType() -> TypeInfo Returns metadata for the concrete runtime type of this instance. Inherited from Object.GetType
Static member: IsFinite(value: float) -> bool Returns true for finite values, including either signed zero.
Static member: IsInfinity(value: float) -> bool Returns true for positive or negative infinity.
Static member: IsNaN(value: float) -> bool Returns true for every NaN representation, regardless of sign or payload.
Static member: IsNegativeInfinity(value: float) -> bool Returns true only for negative infinity.
Static member: IsPositiveInfinity(value: float) -> bool Returns true only for positive infinity.
Static member: Parse(text: string, culture: Culture) -> Result<float, NumberParseError> Parses explicit culture punctuation with strict three-digit grouping; whitespace is not accepted.
Static member: Parse(value: string) -> Result<float, NumberParseError> Parses the complete text using the strict, culture-independent grammar.
ToString() -> string Returns invariant shortest round-trip text, preserving negative zero.
ToString(format: string, culture: Culture) -> string Formats with explicit culture. R ignores valid precision; unsupported formats fault. Implements Formattable.ToString
ToString(format: string) -> string Formats with the current culture using G, R, F, N or E; precision is 0–99.

Operators

4 items
Static member: operator +(left: float, right: float) -> float Development: Adds two values.
Static member: operator /(left: float, right: float) -> float Development: Divides left by right.
Static member: operator *(left: float, right: float) -> float Development: Multiplies two values.
Static member: operator -(left: float, right: float) -> float Development: Subtracts right from left.