public static void renderOrthogonal(ComplexVector vec1,ComplexVector vec2){
  IncompatibleVectorsException.checkVectorsCompatible(vec1,vec2);
  if (vec1.getOpMode() != ComplexVector.Mode.CARTESIAN)   vec1.toCartesian();
  if (vec2.getOpMode() != ComplexVector.Mode.CARTESIAN)   vec2.toCartesian();
  float[] coordinates1=vec1.getCoordinates();
  float[] coordinates2=vec2.getCoordinates();
  double cosine=vec1.measureHermitianOverlap(vec2);
  for (int i=0; i < coordinates1.length; i++)   coordinates1[i]=(float)(coordinates1[i] - cosine * coordinates2[i]);
}

public static void renderOrthogonal ( ComplexVector vec1 , ComplexVector vec2 ) { IncompatibleVectorsException . checkVectorsCompatible ( vec1 , vec2 ) ; if ( vec1 . getOpMode ( ) != ComplexVector . Mode . CARTESIAN ) vec1 . toCartesian ( ) ; if ( vec2 . getOpMode ( ) != ComplexVector . Mode . CARTESIAN ) vec2 . toCartesian ( ) ; float [ ] coordinates1 = vec1 . getCoordinates ( ) ; float [ ] coordinates2 = vec2 . getCoordinates ( ) ; double cosine = vec1 . measureHermitianOverlap ( vec2 ) ; for ( int i = 0 ; i < coordinates1 . length ; i ++ ) coordinates1 [ i ] = ( float ) ( coordinates1 [ i ] - cosine * coordinates2 [ i ] ) ; }
renders vec1 orthogonal to the corresponding component of vec2 where orthogonality is defined by a hermitian scalar product of 0 ( rather than as a mean pairwise cosine between circular vectors of 0 ) both vectors are in put into cartesian mode .
