Explorar el Código

Merge pull request #56525 from timothyqiu/2d-cross-product

Rémi Verschelde hace 3 años
padre
commit
adf29a0deb
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      doc/classes/Vector2.xml

+ 3 - 1
doc/classes/Vector2.xml

@@ -110,7 +110,9 @@
 			<return type="float" />
 			<return type="float" />
 			<argument index="0" name="with" type="Vector2" />
 			<argument index="0" name="with" type="Vector2" />
 			<description>
 			<description>
-				Returns the cross product of 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.
+				[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>
 		<method name="cubic_interpolate" qualifiers="const">
 		<method name="cubic_interpolate" qualifiers="const">