question: public static void renderPairwiseOrthogonal ( 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 ( ) ; for ( int i = 0 ; i < vec1 . getDimension ( ) * 2 ; i += 2 ) { double resultThisPair = coordinates1 [ i ] * coordinates2 [ i ] ; resultThisPair += coordinates1 [ i + 1 ] * coordinates2 [ i + 1 ] ; double norm1 = coordinates1 [ i ] * coordinates1 [ i ] ; norm1 += coordinates1 [ i + 1 ] * coordinates1 [ i + 1 ] ; double norm2 = coordinates2 [ i ] * coordinates2 [ i ] ; norm2 += coordinates2 [ i + 1 ] * coordinates2 [ i + 1 ] ; norm1 = Math . sqrt ( norm1 ) ; norm2 = Math . sqrt ( norm2 ) ; double cosine = 0 ; if ( norm1 > 0 && norm2 > 0 ) cosine = resultThisPair / ( norm1 * norm2 ) ; coordinates1 [ i ] = ( float ) ( coordinates1 [ i ] - cosine * coordinates2 [ i ] ) ; coordinates1 [ i + 1 ] = ( float ) ( coordinates1 [ i + 1 ] - cosine * coordinates2 [ i + 1 ] ) ; } }
target:  Experimental: renders  each circular component of vec1 orthogonal  to the corresponding component of vec2 Both vectors are in put into CARTESIAN mode.