ScarDoc

Start typing to search the SCAR reference.

Function
Util

Util_GetDistanceSquared

Returns the _squared_ distance between two objects

On this page
Util_GetDistanceSquared(Object1, Object2)

Description

This is much cheaper to calculate that Util_GetDistance(), and fine for when you're only comparing results against other squared distances (i.e. to find the closest item)

Parameters

  • Object1entity/squad/egroup/sgroup/marker/posrequired
  • Object2entity/squad/egroup/sgroup/marker/posrequired

Returns

Real

Source

Declared in the game's script sources at:

scar/util.scar