Example #1
0
 /** creates a unit mag complex number. zero is assigned (1,0) */
 public final Cmplx unitVector() {
   double mag = mag();
   if (mag != 0) {
     return Cmplx.div(this, mag);
   } else {
     return new Cmplx(1, 0);
   }
 }