njDistanceL2PL | Japanese
    <-|INDEX|->
Returns the distance between a line and a plane.

### FORMAT

      #include <Ninja.h>

      Float njDisatnceL2L(*l, *pl, *cp)
      NJS_LINE   *l
      NJS_PLANE  *pl
      NJS_POINT3 *cp

### PARAMETERS

NJS_LINE *l
  line data
NJS_PLANE *pl
  plane data
NJS_POINT3 *cp
  intersection of a line and a plane (if not parallel)

### RETURN VALUE

  Distance between a line and a plane.

### FUNCTION

- Returns the distance between a line and a plane.
- When parameter cp is not NULL, the coordinates of the point of intersection between the line and the plane are calculated and stored in cp (when the line and plane are not parallel).
- When the line and plane are parallel, the coordinates of the point of intersection between a perpendicular from the start of the line to the plane is stored.

### EXAMPLE

      NJS_LINE   l;
      NJS_PLANE  pl;
      NJS_POINT3 cp;

      l.px = 2.f;
      l.py = -1.f;
      l.pz = 3.f;
      l.vx = 4.f;
      l.vy = -1.f;
      l.vz = 1.f;
      pl.px = 0.f;
      pl.py = 0.f;
      pl.pz = 0.f;
      pl.vx = 1.f;
      pl.vy = -4.f;
      pl.vz = 1.f;

      njDistanceL2PL(&l, &pl, &cp);

      % Result %
      Return value 0.000000
      cp (-2, 0, 2)

### NOTES

### RELATED TOPICS

  NJS_POINT3
  NJS_LINE
  NJS_PLANE

njDistanceL2PL |
    <-|INDEX|->