diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml
index 8c977dbc674..8db6bcc1b9d 100644
--- a/doc/classes/Vector2i.xml
+++ b/doc/classes/Vector2i.xml
@@ -31,7 +31,7 @@
- Constructs a new [Vector2i] from [Vector2]. The floating point coordinates will be truncated.
+ Constructs a new [Vector2i] from the given [Vector2] by truncating components' fractional parts (rounding towards zero). For a different behavior consider passing the result of [method Vector2.ceil], [method Vector2.floor] or [method Vector2.round] to this constructor instead.
diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml
index 91ccfb6d819..248b47db92a 100644
--- a/doc/classes/Vector3i.xml
+++ b/doc/classes/Vector3i.xml
@@ -31,7 +31,7 @@
- Constructs a new [Vector3i] from [Vector3]. The floating point coordinates will be truncated.
+ Constructs a new [Vector3i] from the given [Vector3] by truncating components' fractional parts (rounding towards zero). For a different behavior consider passing the result of [method Vector3.ceil], [method Vector3.floor] or [method Vector3.round] to this constructor instead.
diff --git a/doc/classes/Vector4i.xml b/doc/classes/Vector4i.xml
index 93377c95996..e2de7a28dc4 100644
--- a/doc/classes/Vector4i.xml
+++ b/doc/classes/Vector4i.xml
@@ -27,7 +27,7 @@
- Constructs a new [Vector4i] from the given [Vector4].
+ Constructs a new [Vector4i] from the given [Vector4] by truncating components' fractional parts (rounding towards zero). For a different behavior consider passing the result of [method Vector4.ceil], [method Vector4.floor] or [method Vector4.round] to this constructor instead.
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2I.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2I.cs
index e849939ebba..0dac8205b6c 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2I.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2I.cs
@@ -504,15 +504,15 @@ namespace Godot
}
///
- /// Converts a to a .
+ /// Converts a to a by truncating
+ /// components' fractional parts (rounding towards zero). For a different
+ /// behavior consider passing the result of ,
+ /// or to this conversion operator instead.
///
/// The vector to convert.
public static explicit operator Vector2I(Vector2 value)
{
- return new Vector2I(
- Mathf.RoundToInt(value.X),
- Mathf.RoundToInt(value.Y)
- );
+ return new Vector2I((int)value.X, (int)value.Y);
}
///
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3I.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3I.cs
index fe899527efb..a2927533f80 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3I.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3I.cs
@@ -559,16 +559,15 @@ namespace Godot
}
///
- /// Converts a to a .
+ /// Converts a to a by truncating
+ /// components' fractional parts (rounding towards zero). For a different
+ /// behavior consider passing the result of ,
+ /// or to this conversion operator instead.
///
/// The vector to convert.
public static explicit operator Vector3I(Vector3 value)
{
- return new Vector3I(
- Mathf.RoundToInt(value.X),
- Mathf.RoundToInt(value.Y),
- Mathf.RoundToInt(value.Z)
- );
+ return new Vector3I((int)value.X, (int)value.Y, (int)value.Z);
}
///
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector4I.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector4I.cs
index f0653270665..bb552b939d1 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector4I.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector4I.cs
@@ -580,17 +580,15 @@ namespace Godot
}
///
- /// Converts a to a .
+ /// Converts a to a by truncating
+ /// components' fractional parts (rounding towards zero). For a different
+ /// behavior consider passing the result of ,
+ /// or to this conversion operator instead.
///
/// The vector to convert.
public static explicit operator Vector4I(Vector4 value)
{
- return new Vector4I(
- Mathf.RoundToInt(value.X),
- Mathf.RoundToInt(value.Y),
- Mathf.RoundToInt(value.Z),
- Mathf.RoundToInt(value.W)
- );
+ return new Vector4I((int)value.X, (int)value.Y, (int)value.Z, (int)value.W);
}
///