SingleToHalf() публичный статический Метод

public static SingleToHalf ( float single ) : ushort
single float
Результат ushort
Пример #1
0
 protected void WriteHalfVector3As4(WritableSection section, Vector3 v)
 {
     section.Writer.Write(HalfHelpers.SingleToHalf(v.X));
     section.Writer.Write(HalfHelpers.SingleToHalf(v.Y));
     section.Writer.Write(HalfHelpers.SingleToHalf(v.Z));
     section.Writer.Write((ushort)0);
 }
Пример #2
0
 protected void WriteHalfVector4(WritableSection section, Vector4 v)
 {
     section.Writer.Write(HalfHelpers.SingleToHalf(v.X));
     section.Writer.Write(HalfHelpers.SingleToHalf(v.Y));
     section.Writer.Write(HalfHelpers.SingleToHalf(v.Z));
     section.Writer.Write(HalfHelpers.SingleToHalf(v.W));
 }
Пример #3
0
 public static void WriteHalfVector3(WritableSection section, Vector3 v)
 {
     section.Writer.Write(HalfHelpers.SingleToHalf(v.X));
     section.Writer.Write(HalfHelpers.SingleToHalf(v.Y));
     section.Writer.Write(HalfHelpers.SingleToHalf(v.Z));
 }