Calculates the cross product of two vectors.
The cross product is a vector that points straight out of the plane created by two vectors. The cross product's magnitude is the area of the parallelogram formed by the original two vectors.
The static version of cross()
, as in p5.Vector.cross(v1, v2)
, is the same as calling v1.cross(v2)
.
Examples
Syntax
cross(v)
cross()
cross(v1, v2)
Parameters
Returns
Related References
textToContours
Returns an array of arrays of points outlining a string of text written using the font.
textToModel
Converts text into a 3D model that can be rendered in WebGL mode.
textToPaths
Returns a flat array of path commands that describe the outlines of a string of text.
textToPoints
Returns an array of points outlining a string of text written using the font.