Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

vlen

From Quake Wiki

float vlen(vector vec)

Usage[edit]

Gets the length of the vector. This is always a positive value.

Parameters[edit]

  • vec
The vector to get the length of.

Return[edit]

The length of the passed vector.

Example[edit]

// Check to make sure a monster's enemy is in range for an attack
float distance = vlen(self.enemy.origin - self.origin);
if (distance > 512)
    return;