Skip to content

Commit

Permalink
Fix example for Basis * Vector3 in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mart3323 authored and akien-mga committed Jun 10, 2024
1 parent 32eba1e commit 771f52e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions doc/classes/Basis.xml
Original file line number Diff line number Diff line change
Expand Up @@ -444,12 +444,14 @@
Transforms (multiplies) the [param right] vector by this basis, returning a [Vector3].
[codeblocks]
[gdscript]
var my_basis = Basis(Vector3(1, 1, 1), Vector3(1, 1, 1), Vector3(0, 2, 5))
print(my_basis * Vector3(1, 2, 3)) # Prints (7, 3, 16)
# 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))
print(my_basis * Vector3(1, 2, 3)) # Prints (4, 2, 6)
[/gdscript]
[csharp]
var myBasis = new Basis(new Vector3(1, 1, 1), new Vector3(1, 1, 1), new Vector3(0, 2, 5));
GD.Print(my_basis * new Vector3(1, 2, 3)); // Prints (7, 3, 16)
// Basis that swaps the X/Z axes and doubles the scale.
var myBasis = new Basis(new Vector3(0, 2, 0), new Vector3(2, 0, 0), new Vector3(0, 0, 2));
GD.Print(myBasis * new Vector3(1, 2, 3)); // Prints (4, 2, 6)
[/csharp]
[/codeblocks]
</description>
Expand Down

0 comments on commit 771f52e

Please sign in to comment.