Half.Explicit Operator

Definition

Overloads

Explicit(Single to Half)

An explicit operator to convert a Single value to a Half.

Explicit(Half to Single)

An explicit operator to convert a Half value to a Single.

Explicit(Double to Half)

An explicit operator to convert a Double value to a Half.

Explicit(Half to Double)

An explicit operator to convert a Half value to a Double.

Explicit(Single to Half)

An explicit operator to convert a Single value to a Half.

public:
 static explicit operator Half(float value);
public static explicit operator Half (float value);
static member op_Explicit : single -> Half
Public Shared Narrowing Operator CType (value As Single) As Half

Parameters

value
Single

The single-precision floating point value to convert to Half.

Returns

Half

The Half representation of the specified single-precision floating point value.

Applies to

Explicit(Half to Single)

An explicit operator to convert a Half value to a Single.

public:
 static explicit operator float(Half value);
public static explicit operator float (Half value);
static member op_Explicit : Half -> single
Public Shared Narrowing Operator CType (value As Half) As Single

Parameters

value
Half

The half-precision floating point value to convert to Single.

Returns

Single

The Single representation of the specified half-precision floating point value.

Applies to

Explicit(Double to Half)

An explicit operator to convert a Double value to a Half.

public:
 static explicit operator Half(double value);
public static explicit operator Half (double value);
static member op_Explicit : double -> Half
Public Shared Narrowing Operator CType (value As Double) As Half

Parameters

value
Double

The double-precision floating point value to convert to Half.

Returns

Half

The Half representation of the specified double-precision floating point value.

Applies to

Explicit(Half to Double)

An explicit operator to convert a Half value to a Double.

public:
 static explicit operator double(Half value);
public static explicit operator double (Half value);
static member op_Explicit : Half -> double
Public Shared Narrowing Operator CType (value As Half) As Double

Parameters

value
Half

The half-precision floating point value to convert to Double.

Returns

Double

The Double representation of the specified half-precision floating point value.

Applies to