文档

Unity Engine

Unity Engine

explicit operator half

Explicitly converts a float value to a half value.
阅读时间1 分钟最后更新于 1 个月前

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.