Table of Contents

Method Distance

Namespace
Anvil.API
Assembly
NWN.Anvil.dll

Distance(Location)

Returns the distance to the target.
If you only need to compare the distance, you can compare the squared distance using DistanceSquared(Location) to avoid a costly sqrt operation.

public float Distance(Location target)

Parameters

target Location

The other location to calculate distance between.

Returns

float

The distance in game units, or -1 if the target is in a different area.