njDistanceP2PL | Japanese
    <-|INDEX|->
Returns the distance between a point and a line.

### FORMAT

      #include <Ninja.h>

      Float njDistanceP2PL(*p, *pl, *cp)
      NJS_POINT3 *p
      NJS_PLANE  *pl
      NJS_POINT3 *cp

### PARAMETERS

NJS_POINT3 *p
  point data
NJS_PLANE *pl
  line data
NJS_POINT3 *cp
  coordinates of the base of the perpendicular from the point p to the line l

### RETURN VALUE

  Distance between a point and a line

### FUNCTION

- Returns the distance between a point and a line.
- When parameter cp is not NULL, the coordinates of the base of the perpendicular from the point p to the line l are returned in cp.

### EXAMPLE

      NJS_POINT3 p, cp;
      NJS_PLANE pl;

      p.x = 100.f;
      p.y = 100.f;
      p.z = 100.f;
      pl.px = 0.f;
      pl.py = 0.f;
      pl.pz = 0.f;
      pl.vx = 0.f;
      pl.vy = 0.f;
      pl.vz = 1.f;

      njDistanceP2PL(&p, &pl, &cp);

      % Result %
      Return value 100.000000
      cp (100, 100, 0)

### NOTES

### RELATED TOPICS

  NJS_POINT3
  NJS_LINE

njDistanceP2PL |
    <-|INDEX|->