Learn R Programming

Momocs (version 1.0.0)

vecs_param: Some vector utilities.

Description

Returns ratio of norms and signed angle between two vectors provided as four numeric.

Usage

vecs_param(r1, i1, r2, i2)

Arguments

r1
the 'real' part of the first vector, i.e. difference in x-coordinates.
i1
the 'imaginary' part of the first vector, i.e. difference in y-coordinates.
r2
the 'real' part of the second vector, i.e. difference in x-coordinates.
i2
the 'imaginary' part of the second vector, i.e. difference in y-coordinates.

Value

A list with two components: r.norms the ratio of (norm of vector 1)/(norm of vector 2) and d.angle the signed angle 'from' the first 'to' the second vector.

Examples

Run this code
vecs_param(1, 0, 0, 2)

Run the code above in your browser using DataLab