##### Ninja Library - Collision Function

# njDistanceP2P

Returns the distance between two points

### FORMAT

`

  Float njDistanceP2P( *p1, *p2 )
  NJS_POINT3 *p1
  NJS_POINT3 *p2

`

### PARAMETER

  `*p1` | Point data 1
  `*p2` | Point data 2

### RETURN

  Distance between the two points

### DESCRIPTION

  Returns the distance between the two points.

### EXAMPLE

      NJS_POINT3 p1, p2;
      p1.x = 100.f;
      p1.y = 100.f;
      p1.z = 100.f;
      p2.x = -100.f;
      p2.y = -100.f;
      p2.z = -100.f;
      njDistanceP2P(&p1, &p2);
      % Result %
      346.410156

njDistanceP2P

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999