浏览代码

C#: Always convert float Variants to System.Double

Godot floats are always 64-bit.
The real_t feature only affects vectors, not scalars.
Raul Santos 2 年之前
父节点
当前提交
fbd41a6eda
共有 1 个文件被更改,包括 0 次插入4 次删除
  1. 0 4
      modules/mono/glue/GodotSharp/GodotSharp/Core/Variant.cs

+ 0 - 4
modules/mono/glue/GodotSharp/GodotSharp/Core/Variant.cs

@@ -114,11 +114,7 @@ public partial struct Variant : IDisposable
         {
         {
             Type.Bool => AsBool(),
             Type.Bool => AsBool(),
             Type.Int => AsInt64(),
             Type.Int => AsInt64(),
-#if REAL_T_IS_DOUBLE
             Type.Float => AsDouble(),
             Type.Float => AsDouble(),
-#else
-            Type.Float => AsSingle(),
-#endif
             Type.String => AsString(),
             Type.String => AsString(),
             Type.Vector2 => AsVector2(),
             Type.Vector2 => AsVector2(),
             Type.Vector2i => AsVector2i(),
             Type.Vector2i => AsVector2i(),