How to add your knowledge

unitize()

    Table of contents
    1. 1. Synopsis
    2. 2. Syntax
    3. 3. Example 1
    4. 4. Example 2

    Synopsis

    Returns a unit vector (a vector of length 1) in the same direction as the given vector. Note that this process is sometimes referred to as "normalization".

    Syntax

    unitize ( v As Vector ) As Vector 
    Argument Type Description
    v Vector Input vector to be unitized.

    Example 1

    Unitize arbitrary vector

    Intent >unitize(Vector(10000,0,0)) 
    --> Vector_(1.0, 0.0, 0.0, WorldFrame()) 

    Example 2

    Unitize arbitrary vector

    Intent >unitize(Vector(1,1,0)) 
    --> Vector_(0.70710678118655, 0.70710678118655, 0.0, WorldFrame())