njUnitVector | Japanese
    <-|INDEX|--
Converts an arbitrary vector to a unit vector.

### FORMAT

      #include <Ninja.h>

      Float njUnitVector(*v)
      NJS_VECTOR *v

### PARAMETERS

NJS_VECTOR *v
  arbitrary vector

### RETURN VALUE

  Size of the original vector. (scalar)

### FUNCTION

- Converts an arbitrary vector to a unit vector.

### EXAMPLE

  The following converts vector v(3, 3, 3) to a unit vector.

      NJS_VECTOR v;
      Float scalor;

      v.x = 3.f;
      v.y = 3.f;
      v.z = 3.f;

      scalor = njUnitVector(&v)

      % result %
      v(0.577350, 0.577350, 0.577350)
      scalor = 5.196152

### NOTES

### RELATED TOPICS

njUnitVector |
    <-|INDEX|--