cross

function

cross(_vector)

Description

Returns the cross product of this vector and the specified vector.

Arguments

Name Type Description
_vector vec2 The vector to compute the cross product with.

Returns

real The cross product. Sign of the 2D cross product tells you whether specific vector is on the left or right side of the first one (Direction of first one being front).

Example

vec1 = new Vec2(10, 10);
vec2 = new Vec2(5, 5);
show_debug_message(vec1.cross(vec2)); // Result: 0

Copyright © 2020, eL-Falso. Built on December 14, 2020 using GMDoc.