# Synopsis

double mth_GetSquaredDistance(int ndim, double *p1, double *p2)

# Purpose

Compute square of distance between two points.

# Description

The square of the linear distance between the two specified points will be returned. The ndim argument specifies the dimensionality of the points (usually 2 or 3).

# Input

## ndim

Number of dimensions in points

## p1

First point

## p2

Second point

# Return

Squared distance between p1 and p2