Update documentation's "Prints" comments after #47502
This commit is contained in:
@ -46,8 +46,8 @@
|
|||||||
[gdscript]
|
[gdscript]
|
||||||
var box = AABB(Vector3(5, 0, 5), Vector3(-20, -10, -5))
|
var box = AABB(Vector3(5, 0, 5), Vector3(-20, -10, -5))
|
||||||
var absolute = box.abs()
|
var absolute = box.abs()
|
||||||
print(absolute.position) # Prints (-15, -10, 0)
|
print(absolute.position) # Prints (-15.0, -10.0, 0.0)
|
||||||
print(absolute.size) # Prints (20, 10, 5)
|
print(absolute.size) # Prints (20.0, 10.0, 5.0)
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
var box = new Aabb(new Vector3(5, 0, 5), new Vector3(-20, -10, -5));
|
var box = new Aabb(new Vector3(5, 0, 5), new Vector3(-20, -10, -5));
|
||||||
@ -96,12 +96,12 @@
|
|||||||
var box = AABB(Vector3(0, 0, 0), Vector3(5, 2, 5))
|
var box = AABB(Vector3(0, 0, 0), Vector3(5, 2, 5))
|
||||||
|
|
||||||
box = box.expand(Vector3(10, 0, 0))
|
box = box.expand(Vector3(10, 0, 0))
|
||||||
print(box.position) # Prints (0, 0, 0)
|
print(box.position) # Prints (0.0, 0.0, 0.0)
|
||||||
print(box.size) # Prints (10, 2, 5)
|
print(box.size) # Prints (10.0, 2.0, 5.0)
|
||||||
|
|
||||||
box = box.expand(Vector3(-5, 0, 5))
|
box = box.expand(Vector3(-5, 0, 5))
|
||||||
print(box.position) # Prints (-5, 0, 0)
|
print(box.position) # Prints (-5.0, 0.0, 0.0)
|
||||||
print(box.size) # Prints (15, 2, 5)
|
print(box.size) # Prints (15.0, 2.0, 5.0)
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
var box = new Aabb(new Vector3(0, 0, 0), new Vector3(5, 2, 5));
|
var box = new Aabb(new Vector3(0, 0, 0), new Vector3(5, 2, 5));
|
||||||
@ -138,15 +138,15 @@
|
|||||||
[gdscript]
|
[gdscript]
|
||||||
var box = AABB(Vector3(0, 0, 0), Vector3(2, 4, 8))
|
var box = AABB(Vector3(0, 0, 0), Vector3(2, 4, 8))
|
||||||
|
|
||||||
print(box.get_longest_axis()) # Prints (0, 0, 1)
|
print(box.get_longest_axis()) # Prints (0.0, 0.0, 1.0)
|
||||||
print(box.get_longest_axis_index()) # Prints 2
|
print(box.get_longest_axis_index()) # Prints 2
|
||||||
print(box.get_longest_axis_size()) # Prints 8
|
print(box.get_longest_axis_size()) # Prints 8.0
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
var box = new Aabb(new Vector3(0, 0, 0), new Vector3(2, 4, 8));
|
var box = new Aabb(new Vector3(0, 0, 0), new Vector3(2, 4, 8));
|
||||||
|
|
||||||
GD.Print(box.GetLongestAxis()); // Prints (0, 0, 1)
|
GD.Print(box.GetLongestAxis()); // Prints (0, 0, 1)
|
||||||
GD.Print(box.GetLongestAxisIndex()); // Prints 2
|
GD.Print(box.GetLongestAxisIndex()); // Prints Z
|
||||||
GD.Print(box.GetLongestAxisSize()); // Prints 8
|
GD.Print(box.GetLongestAxisSize()); // Prints 8
|
||||||
[/csharp]
|
[/csharp]
|
||||||
[/codeblocks]
|
[/codeblocks]
|
||||||
@ -175,15 +175,15 @@
|
|||||||
[gdscript]
|
[gdscript]
|
||||||
var box = AABB(Vector3(0, 0, 0), Vector3(2, 4, 8))
|
var box = AABB(Vector3(0, 0, 0), Vector3(2, 4, 8))
|
||||||
|
|
||||||
print(box.get_shortest_axis()) # Prints (1, 0, 0)
|
print(box.get_shortest_axis()) # Prints (1.0, 0.0, 0.0)
|
||||||
print(box.get_shortest_axis_index()) # Prints 0
|
print(box.get_shortest_axis_index()) # Prints 0
|
||||||
print(box.get_shortest_axis_size()) # Prints 2
|
print(box.get_shortest_axis_size()) # Prints 2.0
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
var box = new Aabb(new Vector3(0, 0, 0), new Vector3(2, 4, 8));
|
var box = new Aabb(new Vector3(0, 0, 0), new Vector3(2, 4, 8));
|
||||||
|
|
||||||
GD.Print(box.GetShortestAxis()); // Prints (1, 0, 0)
|
GD.Print(box.GetShortestAxis()); // Prints (1, 0, 0)
|
||||||
GD.Print(box.GetShortestAxisIndex()); // Prints 0
|
GD.Print(box.GetShortestAxisIndex()); // Prints X
|
||||||
GD.Print(box.GetShortestAxisSize()); // Prints 2
|
GD.Print(box.GetShortestAxisSize()); // Prints 2
|
||||||
[/csharp]
|
[/csharp]
|
||||||
[/codeblocks]
|
[/codeblocks]
|
||||||
@ -225,12 +225,12 @@
|
|||||||
[codeblocks]
|
[codeblocks]
|
||||||
[gdscript]
|
[gdscript]
|
||||||
var a = AABB(Vector3(4, 4, 4), Vector3(8, 8, 8)).grow(4)
|
var a = AABB(Vector3(4, 4, 4), Vector3(8, 8, 8)).grow(4)
|
||||||
print(a.position) # Prints (0, 0, 0)
|
print(a.position) # Prints (0.0, 0.0, 0.0)
|
||||||
print(a.size) # Prints (16, 16, 16)
|
print(a.size) # Prints (16.0, 16.0, 16.0)
|
||||||
|
|
||||||
var b = AABB(Vector3(0, 0, 0), Vector3(8, 4, 2)).grow(2)
|
var b = AABB(Vector3(0, 0, 0), Vector3(8, 4, 2)).grow(2)
|
||||||
print(b.position) # Prints (-2, -2, -2)
|
print(b.position) # Prints (-2.0, -2.0, -2.0)
|
||||||
print(b.size) # Prints (12, 8, 6)
|
print(b.size) # Prints (12.0, 8.0, 6.0)
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
var a = new Aabb(new Vector3(4, 4, 4), new Vector3(8, 8, 8)).Grow(4);
|
var a = new Aabb(new Vector3(4, 4, 4), new Vector3(8, 8, 8)).Grow(4);
|
||||||
@ -275,8 +275,8 @@
|
|||||||
var box2 = AABB(Vector3(2, 0, 2), Vector3(8, 4, 4))
|
var box2 = AABB(Vector3(2, 0, 2), Vector3(8, 4, 4))
|
||||||
|
|
||||||
var intersection = box1.intersection(box2)
|
var intersection = box1.intersection(box2)
|
||||||
print(intersection.position) # Prints (2, 0, 2)
|
print(intersection.position) # Prints (2.0, 0.0, 2.0)
|
||||||
print(intersection.size) # Prints (3, 2, 4)
|
print(intersection.size) # Prints (3.0, 2.0, 4.0)
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
var box1 = new Aabb(new Vector3(0, 0, 0), new Vector3(5, 2, 8));
|
var box1 = new Aabb(new Vector3(0, 0, 0), new Vector3(5, 2, 8));
|
||||||
|
|||||||
@ -12,8 +12,8 @@
|
|||||||
astar_grid.region = Rect2i(0, 0, 32, 32)
|
astar_grid.region = Rect2i(0, 0, 32, 32)
|
||||||
astar_grid.cell_size = Vector2(16, 16)
|
astar_grid.cell_size = Vector2(16, 16)
|
||||||
astar_grid.update()
|
astar_grid.update()
|
||||||
print(astar_grid.get_id_path(Vector2i(0, 0), Vector2i(3, 4))) # prints (0, 0), (1, 1), (2, 2), (3, 3), (3, 4)
|
print(astar_grid.get_id_path(Vector2i(0, 0), Vector2i(3, 4))) # Prints [(0, 0), (1, 1), (2, 2), (3, 3), (3, 4)]
|
||||||
print(astar_grid.get_point_path(Vector2i(0, 0), Vector2i(3, 4))) # prints (0, 0), (16, 16), (32, 32), (48, 48), (48, 64)
|
print(astar_grid.get_point_path(Vector2i(0, 0), Vector2i(3, 4))) # Prints [(0, 0), (16, 16), (32, 32), (48, 48), (48, 64)]
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
AStarGrid2D astarGrid = new AStarGrid2D();
|
AStarGrid2D astarGrid = new AStarGrid2D();
|
||||||
|
|||||||
@ -91,7 +91,7 @@
|
|||||||
# Creates a Basis whose z axis points down.
|
# Creates a Basis whose z axis points down.
|
||||||
var my_basis = Basis.from_euler(Vector3(TAU / 4, 0, 0))
|
var my_basis = Basis.from_euler(Vector3(TAU / 4, 0, 0))
|
||||||
|
|
||||||
print(my_basis.z) # Prints (0, -1, 0)
|
print(my_basis.z) # Prints (0.0, -1.0, 0.0)
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
// Creates a Basis whose z axis points down.
|
// Creates a Basis whose z axis points down.
|
||||||
@ -112,9 +112,9 @@
|
|||||||
[gdscript]
|
[gdscript]
|
||||||
var my_basis = Basis.from_scale(Vector3(2, 4, 8))
|
var my_basis = Basis.from_scale(Vector3(2, 4, 8))
|
||||||
|
|
||||||
print(my_basis.x) # Prints (2, 0, 0)
|
print(my_basis.x) # Prints (2.0, 0.0, 0.0)
|
||||||
print(my_basis.y) # Prints (0, 4, 0)
|
print(my_basis.y) # Prints (0.0, 4.0, 0.0)
|
||||||
print(my_basis.z) # Prints (0, 0, 8)
|
print(my_basis.z) # Prints (0.0, 0.0, 8.0)
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
var myBasis = Basis.FromScale(new Vector3(2.0f, 4.0f, 8.0f));
|
var myBasis = Basis.FromScale(new Vector3(2.0f, 4.0f, 8.0f));
|
||||||
@ -163,7 +163,7 @@
|
|||||||
my_basis = my_basis.rotated(Vector3.UP, TAU / 2)
|
my_basis = my_basis.rotated(Vector3.UP, TAU / 2)
|
||||||
my_basis = my_basis.rotated(Vector3.RIGHT, TAU / 4)
|
my_basis = my_basis.rotated(Vector3.RIGHT, TAU / 4)
|
||||||
|
|
||||||
print(my_basis.get_scale()) # Prints (2, 4, 8)
|
print(my_basis.get_scale()) # Prints (2.0, 4.0, 8.0)
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
var myBasis = new Basis(
|
var myBasis = new Basis(
|
||||||
@ -285,9 +285,9 @@
|
|||||||
)
|
)
|
||||||
my_basis = my_basis.scaled(Vector3(0, 2, -2))
|
my_basis = my_basis.scaled(Vector3(0, 2, -2))
|
||||||
|
|
||||||
print(my_basis.x) # Prints (0, 2, -2)
|
print(my_basis.x) # Prints (0.0, 2.0, -2.0)
|
||||||
print(my_basis.y) # Prints (0, 4, -4)
|
print(my_basis.y) # Prints (0.0, 4.0, -4.0)
|
||||||
print(my_basis.z) # Prints (0, 6, -6)
|
print(my_basis.z) # Prints (0.0, 6.0, -6.0)
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
var myBasis = new Basis(
|
var myBasis = new Basis(
|
||||||
@ -360,9 +360,9 @@
|
|||||||
)
|
)
|
||||||
my_basis = my_basis.transposed()
|
my_basis = my_basis.transposed()
|
||||||
|
|
||||||
print(my_basis.x) # Prints (1, 4, 7)
|
print(my_basis.x) # Prints (1.0, 4.0, 7.0)
|
||||||
print(my_basis.y) # Prints (2, 5, 8)
|
print(my_basis.y) # Prints (2.0, 5.0, 8.0)
|
||||||
print(my_basis.z) # Prints (3, 6, 9)
|
print(my_basis.z) # Prints (3.0, 6.0, 9.0)
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
var myBasis = new Basis(
|
var myBasis = new Basis(
|
||||||
@ -454,7 +454,7 @@
|
|||||||
[gdscript]
|
[gdscript]
|
||||||
# Basis that swaps the X/Z axes and doubles the scale.
|
# Basis that swaps the X/Z axes and doubles the scale.
|
||||||
var my_basis = Basis(Vector3(0, 2, 0), Vector3(2, 0, 0), Vector3(0, 0, 2))
|
var my_basis = Basis(Vector3(0, 2, 0), Vector3(2, 0, 0), Vector3(0, 0, 2))
|
||||||
print(my_basis * Vector3(1, 2, 3)) # Prints (4, 2, 6)
|
print(my_basis * Vector3(1, 2, 3)) # Prints (4.0, 2.0, 6.0)
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
// Basis that swaps the X/Z axes and doubles the scale.
|
// Basis that swaps the X/Z axes and doubles the scale.
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
func test():
|
func test():
|
||||||
var callable = Callable(self, "print_args")
|
var callable = Callable(self, "print_args")
|
||||||
callable.call("hello", "world") # Prints "hello world ".
|
callable.call("hello", "world") # Prints "hello world ".
|
||||||
callable.call(Vector2.UP, 42, callable) # Prints "(0, -1) 42 Node(node.gd)::print_args".
|
callable.call(Vector2.UP, 42, callable) # Prints "(0.0, -1.0) 42 Node(node.gd)::print_args".
|
||||||
callable.call("invalid") # Invalid call, should have at least 2 arguments.
|
callable.call("invalid") # Invalid call, should have at least 2 arguments.
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
|
|||||||
@ -201,13 +201,13 @@
|
|||||||
var polygon = PackedVector2Array([Vector2(0, 0), Vector2(100, 0), Vector2(100, 100), Vector2(0, 100)])
|
var polygon = PackedVector2Array([Vector2(0, 0), Vector2(100, 0), Vector2(100, 100), Vector2(0, 100)])
|
||||||
var offset = Vector2(50, 50)
|
var offset = Vector2(50, 50)
|
||||||
polygon = Transform2D(0, offset) * polygon
|
polygon = Transform2D(0, offset) * polygon
|
||||||
print(polygon) # prints [(50, 50), (150, 50), (150, 150), (50, 150)]
|
print(polygon) # Prints [(50.0, 50.0), (150.0, 50.0), (150.0, 150.0), (50.0, 150.0)]
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
var polygon = new Vector2[] { new Vector2(0, 0), new Vector2(100, 0), new Vector2(100, 100), new Vector2(0, 100) };
|
var polygon = new Vector2[] { new Vector2(0, 0), new Vector2(100, 0), new Vector2(100, 100), new Vector2(0, 100) };
|
||||||
var offset = new Vector2(50, 50);
|
var offset = new Vector2(50, 50);
|
||||||
polygon = new Transform2D(0, offset) * polygon;
|
polygon = new Transform2D(0, offset) * polygon;
|
||||||
GD.Print((Variant)polygon); // prints [(50, 50), (150, 50), (150, 150), (50, 150)]
|
GD.Print((Variant)polygon); // Prints [(50, 50), (150, 50), (150, 150), (50, 150)]
|
||||||
[/csharp]
|
[/csharp]
|
||||||
[/codeblocks]
|
[/codeblocks]
|
||||||
</description>
|
</description>
|
||||||
|
|||||||
@ -987,12 +987,12 @@
|
|||||||
[gdscript]
|
[gdscript]
|
||||||
var node = Node2D.new()
|
var node = Node2D.new()
|
||||||
node.set("global_scale", Vector2(8, 2.5))
|
node.set("global_scale", Vector2(8, 2.5))
|
||||||
print(node.global_scale) # Prints (8, 2.5)
|
print(node.global_scale) # Prints (8.0, 2.5)
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
var node = new Node2D();
|
var node = new Node2D();
|
||||||
node.Set(Node2D.PropertyName.GlobalScale, new Vector2(8, 2.5));
|
node.Set(Node2D.PropertyName.GlobalScale, new Vector2(8, 2.5f));
|
||||||
GD.Print(node.GlobalScale); // Prints Vector2(8, 2.5)
|
GD.Print(node.GlobalScale); // Prints (8, 2.5)
|
||||||
[/csharp]
|
[/csharp]
|
||||||
[/codeblocks]
|
[/codeblocks]
|
||||||
[b]Note:[/b] In C#, [param property] must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the [code]PropertyName[/code] class to avoid allocating a new [StringName] on each call.
|
[b]Note:[/b] In C#, [param property] must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the [code]PropertyName[/code] class to avoid allocating a new [StringName] on each call.
|
||||||
@ -1047,7 +1047,7 @@
|
|||||||
var node = Node2D.new()
|
var node = Node2D.new()
|
||||||
node.set_indexed("position", Vector2(42, 0))
|
node.set_indexed("position", Vector2(42, 0))
|
||||||
node.set_indexed("position:y", -10)
|
node.set_indexed("position:y", -10)
|
||||||
print(node.position) # Prints (42, -10)
|
print(node.position) # Prints (42.0, -10.0)
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
var node = new Node2D();
|
var node = new Node2D();
|
||||||
|
|||||||
@ -116,7 +116,7 @@
|
|||||||
# Rotating the Transform2D in any way preserves its scale.
|
# Rotating the Transform2D in any way preserves its scale.
|
||||||
my_transform = my_transform.rotated(TAU / 2)
|
my_transform = my_transform.rotated(TAU / 2)
|
||||||
|
|
||||||
print(my_transform.get_scale()) # Prints (2, 4)
|
print(my_transform.get_scale()) # Prints (2.0, 4.0)
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
var myTransform = new Transform2D(
|
var myTransform = new Transform2D(
|
||||||
|
|||||||
@ -213,9 +213,9 @@
|
|||||||
<description>
|
<description>
|
||||||
Creates a unit [Vector2] rotated to the given [param angle] in radians. This is equivalent to doing [code]Vector2(cos(angle), sin(angle))[/code] or [code]Vector2.RIGHT.rotated(angle)[/code].
|
Creates a unit [Vector2] rotated to the given [param angle] in radians. This is equivalent to doing [code]Vector2(cos(angle), sin(angle))[/code] or [code]Vector2.RIGHT.rotated(angle)[/code].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector2.from_angle(0)) # Prints (1, 0).
|
print(Vector2.from_angle(0)) # Prints (1.0, 0.0).
|
||||||
print(Vector2(1, 0).angle()) # Prints 0, which is the angle used above.
|
print(Vector2(1, 0).angle()) # Prints 0.0, which is the angle used above.
|
||||||
print(Vector2.from_angle(PI / 2)) # Prints (0, 1).
|
print(Vector2.from_angle(PI / 2)) # Prints (0.0, 1.0).
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
@ -477,7 +477,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Multiplies each component of the [Vector2] by the components of the given [Vector2].
|
Multiplies each component of the [Vector2] by the components of the given [Vector2].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector2(10, 20) * Vector2(3, 4)) # Prints "(30, 80)"
|
print(Vector2(10, 20) * Vector2(3, 4)) # Prints (30.0, 80.0)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -501,7 +501,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Adds each component of the [Vector2] by the components of the given [Vector2].
|
Adds each component of the [Vector2] by the components of the given [Vector2].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector2(10, 20) + Vector2(3, 4)) # Prints "(13, 24)"
|
print(Vector2(10, 20) + Vector2(3, 4)) # Prints (13.0, 24.0)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -511,7 +511,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Subtracts each component of the [Vector2] by the components of the given [Vector2].
|
Subtracts each component of the [Vector2] by the components of the given [Vector2].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector2(10, 20) - Vector2(3, 4)) # Prints "(7, 16)"
|
print(Vector2(10, 20) - Vector2(3, 4)) # Prints (7.0, 16.0)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -521,7 +521,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Divides each component of the [Vector2] by the components of the given [Vector2].
|
Divides each component of the [Vector2] by the components of the given [Vector2].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector2(10, 20) / Vector2(2, 5)) # Prints "(5, 4)"
|
print(Vector2(10, 20) / Vector2(2, 5)) # Prints (5.0, 4.0)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
|
|||||||
@ -215,7 +215,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Gets the remainder of each component of the [Vector2i] with the components of the given [Vector2i]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
|
Gets the remainder of each component of the [Vector2i] with the components of the given [Vector2i]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector2i(10, -20) % Vector2i(7, 8)) # Prints "(3, -4)"
|
print(Vector2i(10, -20) % Vector2i(7, 8)) # Prints (3, -4)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -225,7 +225,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Gets the remainder of each component of the [Vector2i] with the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
|
Gets the remainder of each component of the [Vector2i] with the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector2i(10, -20) % 7) # Prints "(3, -6)"
|
print(Vector2i(10, -20) % 7) # Prints (3, -6)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -235,7 +235,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Multiplies each component of the [Vector2i] by the components of the given [Vector2i].
|
Multiplies each component of the [Vector2i] by the components of the given [Vector2i].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector2i(10, 20) * Vector2i(3, 4)) # Prints "(30, 80)"
|
print(Vector2i(10, 20) * Vector2i(3, 4)) # Prints (30, 80)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -245,7 +245,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Multiplies each component of the [Vector2i] by the given [float]. Returns a [Vector2].
|
Multiplies each component of the [Vector2i] by the given [float]. Returns a [Vector2].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector2i(10, 15) * 0.9) # Prints "(9, 13.5)"
|
print(Vector2i(10, 15) * 0.9) # Prints (9.0, 13.5)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -262,7 +262,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Adds each component of the [Vector2i] by the components of the given [Vector2i].
|
Adds each component of the [Vector2i] by the components of the given [Vector2i].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector2i(10, 20) + Vector2i(3, 4)) # Prints "(13, 24)"
|
print(Vector2i(10, 20) + Vector2i(3, 4)) # Prints (13, 24)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -272,7 +272,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Subtracts each component of the [Vector2i] by the components of the given [Vector2i].
|
Subtracts each component of the [Vector2i] by the components of the given [Vector2i].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector2i(10, 20) - Vector2i(3, 4)) # Prints "(7, 16)"
|
print(Vector2i(10, 20) - Vector2i(3, 4)) # Prints (7, 16)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -282,7 +282,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Divides each component of the [Vector2i] by the components of the given [Vector2i].
|
Divides each component of the [Vector2i] by the components of the given [Vector2i].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector2i(10, 20) / Vector2i(2, 5)) # Prints "(5, 4)"
|
print(Vector2i(10, 20) / Vector2i(2, 5)) # Prints (5, 4)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -292,7 +292,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Divides each component of the [Vector2i] by the given [float]. Returns a [Vector2].
|
Divides each component of the [Vector2i] by the given [float]. Returns a [Vector2].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector2i(10, 20) / 2.9) # Prints "(5, 10)"
|
print(Vector2i(10, 20) / 2.9) # Prints (5.0, 10.0)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
|
|||||||
@ -518,7 +518,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Multiplies each component of the [Vector3] by the components of the given [Vector3].
|
Multiplies each component of the [Vector3] by the components of the given [Vector3].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector3(10, 20, 30) * Vector3(3, 4, 5)) # Prints "(30, 80, 150)"
|
print(Vector3(10, 20, 30) * Vector3(3, 4, 5)) # Prints (30.0, 80.0, 150.0)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -542,7 +542,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Adds each component of the [Vector3] by the components of the given [Vector3].
|
Adds each component of the [Vector3] by the components of the given [Vector3].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector3(10, 20, 30) + Vector3(3, 4, 5)) # Prints "(13, 24, 35)"
|
print(Vector3(10, 20, 30) + Vector3(3, 4, 5)) # Prints (13.0, 24.0, 35.0)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -552,7 +552,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Subtracts each component of the [Vector3] by the components of the given [Vector3].
|
Subtracts each component of the [Vector3] by the components of the given [Vector3].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector3(10, 20, 30) - Vector3(3, 4, 5)) # Prints "(7, 16, 25)"
|
print(Vector3(10, 20, 30) - Vector3(3, 4, 5)) # Prints (7.0, 16.0, 25.0)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -562,7 +562,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Divides each component of the [Vector3] by the components of the given [Vector3].
|
Divides each component of the [Vector3] by the components of the given [Vector3].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector3(10, 20, 30) / Vector3(2, 5, 3)) # Prints "(5, 4, 10)"
|
print(Vector3(10, 20, 30) / Vector3(2, 5, 3)) # Prints (5.0, 4.0, 10.0)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
|
|||||||
@ -222,7 +222,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Gets the remainder of each component of the [Vector3i] with the components of the given [Vector3i]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
|
Gets the remainder of each component of the [Vector3i] with the components of the given [Vector3i]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector3i(10, -20, 30) % Vector3i(7, 8, 9)) # Prints "(3, -4, 3)"
|
print(Vector3i(10, -20, 30) % Vector3i(7, 8, 9)) # Prints (3, -4, 3)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -232,7 +232,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Gets the remainder of each component of the [Vector3i] with the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
|
Gets the remainder of each component of the [Vector3i] with the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector3i(10, -20, 30) % 7) # Prints "(3, -6, 2)"
|
print(Vector3i(10, -20, 30) % 7) # Prints (3, -6, 2)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -242,7 +242,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Multiplies each component of the [Vector3i] by the components of the given [Vector3i].
|
Multiplies each component of the [Vector3i] by the components of the given [Vector3i].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector3i(10, 20, 30) * Vector3i(3, 4, 5)) # Prints "(30, 80, 150)"
|
print(Vector3i(10, 20, 30) * Vector3i(3, 4, 5)) # Prints (30, 80, 150)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -252,7 +252,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Multiplies each component of the [Vector3i] by the given [float]. Returns a [Vector3].
|
Multiplies each component of the [Vector3i] by the given [float]. Returns a [Vector3].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector3i(10, 15, 20) * 0.9) # Prints "(9, 13.5, 18)"
|
print(Vector3i(10, 15, 20) * 0.9) # Prints (9.0, 13.5, 18.0)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -269,7 +269,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Adds each component of the [Vector3i] by the components of the given [Vector3i].
|
Adds each component of the [Vector3i] by the components of the given [Vector3i].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector3i(10, 20, 30) + Vector3i(3, 4, 5)) # Prints "(13, 24, 35)"
|
print(Vector3i(10, 20, 30) + Vector3i(3, 4, 5)) # Prints (13, 24, 35)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -279,7 +279,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Subtracts each component of the [Vector3i] by the components of the given [Vector3i].
|
Subtracts each component of the [Vector3i] by the components of the given [Vector3i].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector3i(10, 20, 30) - Vector3i(3, 4, 5)) # Prints "(7, 16, 25)"
|
print(Vector3i(10, 20, 30) - Vector3i(3, 4, 5)) # Prints (7, 16, 25)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -289,7 +289,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Divides each component of the [Vector3i] by the components of the given [Vector3i].
|
Divides each component of the [Vector3i] by the components of the given [Vector3i].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector3i(10, 20, 30) / Vector3i(2, 5, 3)) # Prints "(5, 4, 10)"
|
print(Vector3i(10, 20, 30) / Vector3i(2, 5, 3)) # Prints (5, 4, 10)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -299,7 +299,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Divides each component of the [Vector3i] by the given [float]. Returns a [Vector3].
|
Divides each component of the [Vector3i] by the given [float]. Returns a [Vector3].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector3i(10, 20, 30) / 2.9) # Prints "(5, 10, 15)"
|
print(Vector3i(10, 20, 30) / 2.9) # Prints (5.0, 10.0, 15.0)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
|
|||||||
@ -333,7 +333,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Multiplies each component of the [Vector4] by the components of the given [Vector4].
|
Multiplies each component of the [Vector4] by the components of the given [Vector4].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector4(10, 20, 30, 40) * Vector4(3, 4, 5, 6)) # Prints "(30, 80, 150, 240)"
|
print(Vector4(10, 20, 30, 40) * Vector4(3, 4, 5, 6)) # Prints (30.0, 80.0, 150.0, 240.0)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -343,7 +343,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Multiplies each component of the [Vector4] by the given [float].
|
Multiplies each component of the [Vector4] by the given [float].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector4(10, 20, 30, 40) * 2) # Prints "(20, 40, 60, 80)"
|
print(Vector4(10, 20, 30, 40) * 2) # Prints (20.0, 40.0, 60.0, 80.0)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -360,7 +360,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Adds each component of the [Vector4] by the components of the given [Vector4].
|
Adds each component of the [Vector4] by the components of the given [Vector4].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector4(10, 20, 30, 40) + Vector4(3, 4, 5, 6)) # Prints "(13, 24, 35, 46)"
|
print(Vector4(10, 20, 30, 40) + Vector4(3, 4, 5, 6)) # Prints (13.0, 24.0, 35.0, 46.0)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -370,7 +370,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Subtracts each component of the [Vector4] by the components of the given [Vector4].
|
Subtracts each component of the [Vector4] by the components of the given [Vector4].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector4(10, 20, 30, 40) - Vector4(3, 4, 5, 6)) # Prints "(7, 16, 25, 34)"
|
print(Vector4(10, 20, 30, 40) - Vector4(3, 4, 5, 6)) # Prints (7.0, 16.0, 25.0, 34.0)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -380,7 +380,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Divides each component of the [Vector4] by the components of the given [Vector4].
|
Divides each component of the [Vector4] by the components of the given [Vector4].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector4(10, 20, 30, 40) / Vector4(2, 5, 3, 4)) # Prints "(5, 4, 10, 10)"
|
print(Vector4(10, 20, 30, 40) / Vector4(2, 5, 3, 4)) # Prints (5.0, 4.0, 10.0, 10.0)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -390,7 +390,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Divides each component of the [Vector4] by the given [float].
|
Divides each component of the [Vector4] by the given [float].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector4(10, 20, 30, 40) / 2 # Prints "(5, 10, 15, 20)"
|
print(Vector4(10, 20, 30, 40) / 2 # Prints (5.0, 10.0, 15.0, 20.0)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
|
|||||||
@ -208,7 +208,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Gets the remainder of each component of the [Vector4i] with the components of the given [Vector4i]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
|
Gets the remainder of each component of the [Vector4i] with the components of the given [Vector4i]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector4i(10, -20, 30, -40) % Vector4i(7, 8, 9, 10)) # Prints "(3, -4, 3, 0)"
|
print(Vector4i(10, -20, 30, -40) % Vector4i(7, 8, 9, 10)) # Prints (3, -4, 3, 0)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -218,7 +218,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Gets the remainder of each component of the [Vector4i] with the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
|
Gets the remainder of each component of the [Vector4i] with the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector4i(10, -20, 30, -40) % 7) # Prints "(3, -6, 2, -5)"
|
print(Vector4i(10, -20, 30, -40) % 7) # Prints (3, -6, 2, -5)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -228,7 +228,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Multiplies each component of the [Vector4i] by the components of the given [Vector4i].
|
Multiplies each component of the [Vector4i] by the components of the given [Vector4i].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector4i(10, 20, 30, 40) * Vector4i(3, 4, 5, 6)) # Prints "(30, 80, 150, 240)"
|
print(Vector4i(10, 20, 30, 40) * Vector4i(3, 4, 5, 6)) # Prints (30, 80, 150, 240)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -239,7 +239,7 @@
|
|||||||
Multiplies each component of the [Vector4i] by the given [float].
|
Multiplies each component of the [Vector4i] by the given [float].
|
||||||
Returns a Vector4 value due to floating-point operations.
|
Returns a Vector4 value due to floating-point operations.
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector4i(10, 20, 30, 40) * 2) # Prints "(20, 40, 60, 80)"
|
print(Vector4i(10, 20, 30, 40) * 2) # Prints (20.0, 40.0, 60.0, 80.0)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -256,7 +256,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Adds each component of the [Vector4i] by the components of the given [Vector4i].
|
Adds each component of the [Vector4i] by the components of the given [Vector4i].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector4i(10, 20, 30, 40) + Vector4i(3, 4, 5, 6)) # Prints "(13, 24, 35, 46)"
|
print(Vector4i(10, 20, 30, 40) + Vector4i(3, 4, 5, 6)) # Prints (13, 24, 35, 46)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -266,7 +266,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Subtracts each component of the [Vector4i] by the components of the given [Vector4i].
|
Subtracts each component of the [Vector4i] by the components of the given [Vector4i].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector4i(10, 20, 30, 40) - Vector4i(3, 4, 5, 6)) # Prints "(7, 16, 25, 34)"
|
print(Vector4i(10, 20, 30, 40) - Vector4i(3, 4, 5, 6)) # Prints (7, 16, 25, 34)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -276,7 +276,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Divides each component of the [Vector4i] by the components of the given [Vector4i].
|
Divides each component of the [Vector4i] by the components of the given [Vector4i].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector4i(10, 20, 30, 40) / Vector4i(2, 5, 3, 4)) # Prints "(5, 4, 10, 10)"
|
print(Vector4i(10, 20, 30, 40) / Vector4i(2, 5, 3, 4)) # Prints (5, 4, 10, 10)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -287,7 +287,7 @@
|
|||||||
Divides each component of the [Vector4i] by the given [float].
|
Divides each component of the [Vector4i] by the given [float].
|
||||||
Returns a Vector4 value due to floating-point operations.
|
Returns a Vector4 value due to floating-point operations.
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(Vector4i(10, 20, 30, 40) / 2 # Prints "(5, 10, 15, 20)"
|
print(Vector4i(10, 20, 30, 40) / 2 # Prints (5.0, 10.0, 15.0, 20.0)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
|
|||||||
@ -97,7 +97,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Multiplies each component of the [Vector2i] by the given [float]. Returns a [Vector2].
|
Multiplies each component of the [Vector2i] by the given [float]. Returns a [Vector2].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(0.9 * Vector2i(10, 15)) # Prints "(9, 13.5)"
|
print(0.9 * Vector2i(10, 15)) # Prints (9.0, 13.5)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -114,7 +114,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Multiplies each component of the [Vector3i] by the given [float]. Returns a [Vector3].
|
Multiplies each component of the [Vector3i] by the given [float]. Returns a [Vector3].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(0.9 * Vector3i(10, 15, 20)) # Prints "(9, 13.5, 18)"
|
print(0.9 * Vector3i(10, 15, 20)) # Prints (9.0, 13.5, 18.0)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
@ -131,7 +131,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Multiplies each component of the [Vector4i] by the given [float]. Returns a [Vector4].
|
Multiplies each component of the [Vector4i] by the given [float]. Returns a [Vector4].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(0.9 * Vector4i(10, 15, 20, -10)) # Prints "(9, 13.5, 18, -9)"
|
print(0.9 * Vector4i(10, 15, 20, -10)) # Prints (9.0, 13.5, 18.0, -9.0)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</operator>
|
</operator>
|
||||||
|
|||||||
Reference in New Issue
Block a user