Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


explicit operator half

Explicitly converts a float value to a half value.
Read time 1 minuteLast updated 11 days ago

Definition

  • Type: Operator
  • Namespace: Unity.Mathematics
  • Assembly: UnityEngine.MathematicsModule

explicit operator half(hal)

Explicitly converts a float value to a half value.
public static explicit operator half(float v)

Parameters

The single precision float value to convert to half.

Returns

Type

Description

halfThe converted half value.

explicit operator half(hal)

Explicitly converts a double value to a half value.
public static explicit operator half(double v)

Parameters

The double precision float value to convert to half.

Returns

Type

Description

halfThe converted half value.