3D Lingo Dictionary > A-B > angleBetween |  |

angleBetween

Syntax

    vector1.angleBetween(vector2)

Description

3D vector method; returns the angle between two vectors, in degrees.

Example

In this example, `pos1` is a vector on the X axis and `pos2` is a vector on the Y axis. The angle between these two vectors is 90°. The value returned by `pos1.angleBetween(pos2)` is 90.0000.

    pos1 = vector(100, 0, 0)
    pos2 = vector(0, 100, 0)
    put pos1.angleBetween(pos2)
    -- 90.0000

See also

`dot()`, `dotProduct()`