nns.c  1.0.1
Nanowire Network simulator
point.h File Reference

Defines a structure representing a point in the Cartesian space, and a function to compute the squared Euclidean distance between two points. More...

Go to the source code of this file.

Classes

struct  point
 Structure representing a point in the cartesian space. More...
 

Functions

double squared_distance (const point a, const point b)
 Compute the point to point distance with the euclidean rule without performing the root. E.g.: (x1 - x2)^2 + (y1 - y2)^2. More...
 

Detailed Description

Defines a structure representing a point in the Cartesian space, and a function to compute the squared Euclidean distance between two points.

Function Documentation

◆ squared_distance()

double squared_distance ( const point  a,
const point  b 
)

Compute the point to point distance with the euclidean rule without performing the root. E.g.: (x1 - x2)^2 + (y1 - y2)^2.

Parameters
[in]aThe first point.
[in]bThe second point.
Returns
The distance between 'a' and 'b'.