[Doc] Clarify the behavior of Vector2/3.cross
and mention parallel vectors
(cherry picked from commit 47a8033698
)
This commit is contained in:
parent
1db5090dcd
commit
a9988c5501
2 changed files with 2 additions and 1 deletions
|
@ -87,7 +87,7 @@
|
||||||
<argument index="0" name="with" type="Vector2" />
|
<argument index="0" name="with" type="Vector2" />
|
||||||
<description>
|
<description>
|
||||||
Returns the 2D analog of the cross product for this vector and [code]with[/code].
|
Returns the 2D analog of the cross product for this vector and [code]with[/code].
|
||||||
This is the signed area of the parallelogram formed by the two vectors. If the second vector is clockwise from the first vector, then the cross product is the positive area. If counter-clockwise, the cross product is the negative area.
|
This is the signed area of the parallelogram formed by the two vectors. If the second vector is clockwise from the first vector, then the cross product is the positive area. If counter-clockwise, the cross product is the negative area. If the two vectors are parallel this returns zero, making it useful for testing if two vectors are parallel.
|
||||||
[b]Note:[/b] Cross product is not defined in 2D mathematically. This method embeds the 2D vectors in the XY plane of 3D space and uses their cross product's Z component as the analog.
|
[b]Note:[/b] Cross product is not defined in 2D mathematically. This method embeds the 2D vectors in the XY plane of 3D space and uses their cross product's Z component as the analog.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
<argument index="0" name="b" type="Vector3" />
|
<argument index="0" name="b" type="Vector3" />
|
||||||
<description>
|
<description>
|
||||||
Returns the cross product of this vector and [code]b[/code].
|
Returns the cross product of this vector and [code]b[/code].
|
||||||
|
This returns a vector perpendicular to both this and [param with], which would be the normal vector of the plane defined by the two vectors. As there are two such vectors, in opposite directions, this method returns the vector defined by a right-handed coordinate system. If the two vectors are parallel this returns an empty vector, making it useful for testing if two vectors are parallel.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="cubic_interpolate">
|
<method name="cubic_interpolate">
|
||||||
|
|
Loading…
Reference in a new issue