Fix some forgotten lowercase x/y/z

This commit is contained in:
Paul Joannon
2023-10-21 21:23:01 +02:00
parent a6411c7d9d
commit a60ab49aac
5 changed files with 14 additions and 10 deletions
+3 -3
View File
@@ -85,8 +85,8 @@ To do this in code, we multiply each of the vectors:
Transform2D t = Transform2D.Identity;
// Scale
t.x *= 2;
t.y *= 2;
t.X *= 2;
t.Y *= 2;
Transform = t; // Change the node's transform to what we calculated.
If we wanted to return it to its original scale, we can multiply
@@ -324,7 +324,7 @@ As an example, let's set Y to (1, 1):
Transform2D t = Transform2D.Identity;
// Shear by setting Y to (1, 1)
t.y = Vector2.One;
t.Y = Vector2.One;
Transform = t; // Change the node's transform to what we calculated.
.. note:: You can't set the raw values of a Transform2D in the editor,
+2 -2
View File
@@ -189,9 +189,9 @@ degrees to either side:
// Calculate vector from `a` to `b`.
var dvec = pointA.DirectionTo(pointB);
// Rotate 90 degrees.
var normal = new Vector2(dvec.y, -dvec.x);
var normal = new Vector2(dvec.Y, -dvec.X);
// Alternatively (depending the desired side of the normal):
// var normal = new Vector2(-dvec.y, dvec.x);
// var normal = new Vector2(-dvec.Y, dvec.X);
The rest is the same as the previous example. Either point_a or
point_b will work, as they are in the same plane: