normalize

function

normalize()

Description

Normalizes the vector

Returns

vec2 New normalized vector otherwise 'self'

Example

vec1 = new Vec3(10, 5, 3);
show_debug_message(vec1.normalize()); // Result: { x : 0.86, y : 0.43, z : 0.26 }

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