createVector()
Creates a 2D or 3D Geometric vector from coordinates
Last updated
Creates a 2D or 3D Geometric vector from coordinates
Last updated
x
horizontal component of the vector
y
vertical component of the vector
z(optional)
depth component of the vector (in case of 3D)
The createVector()
function is used to create a 2D or 3D vector, which is essentially an object with x
, y
, and optionally z
properties that represent a magnitude and direction in space.
Once you have created a vector using the createVector()
function, you can access its components using the x
, y
, and z
properties.
Find these documents helpful? Let the people who made them help your child learn to code at Strivemath!
We'd love to hear your Feedback/Comments here.