public function polarReflection($axis) {
        if (is_null($axis)) {
            return null;
        }
        if (is_array($axis)) {
            $axisWidth = $axis[0]->interval($axis[1]);
            $offset = $this->interval($axis[0]);
            $transposeBy = ($offset * 2) + $axisWidth;
            $this->transpose($transposeBy);
        } else {
            $distance = $this->interval($axis);
            $transposeBy = $distance * 2;
            $this->transpose($transposeBy);
        }
    }
public function polarReflection($axis) {
        if (is_null($axis)) {
            return null;
        }
        if (is_array($axis)) {
            $axisWidth = $axis[0]->interval($axis[1]);
            $offset = $this->interval($axis[0]);
            $transposeBy = ($offset * 2) + $axisWidth;
            $this->transpose($transposeBy);
        } else {
            $distance = $this->interval($axis);
            $transposeBy = $distance * 2;
            $this->transpose($transposeBy);
        }
    }
public function polarReflection ( $ axis ) { if ( is_null ( $ axis ) ) { return null ; } if ( is_array ( $ axis ) ) { $ axisWidth = $ axis [ 0 ] -> interval ( $ axis [ 1 ] ) ; $ offset = $ this -> interval ( $ axis [ 0 ] ) ; $ transposeBy = ( $ offset * 2 ) + $ axisWidth ; $ this -> transpose ( $ transposeBy ) ; } else { $ distance = $ this -> interval ( $ axis ) ; $ transposeBy = $ distance * 2 ; $ this -> transpose ( $ transposeBy ) ; } }
This "reflects" a pitch across an axis, producing an opposite pitch.
Reflection alters this pitch by reference. It does not return a clone or a new Pitch.

For example, if the axis is C and the pitch is E (a major 3 above), then the output is A flat
(a major 3 below).
The axis might be a Pitch, or it might be an array of two Pitches. If the latter then the axis is
actually a point half way between the two pitches. A typical example is to use a tonic-dominant
axis, e.g. C and G. The actual reflection point is half way between E and E flat.
Reflected across the axis, a C becomes a G, and G becomes a C. D becomes F, and D sharp becomes F flat.

Polar reflection is used to mine new sonorities from series of plagal cadences (biii, bvii, IV, I), in
contrast to more conventional series of perfect cadences (vi, ii, V, I). In Jazz theory this has become
popularlized as "negative harmony".

We should expect that a heightless pitch will reflect into another heightless pitch, an array of Pitches
should reflect into an array of Pitches, and that a Chord comprised of Notes with Pitches should reflect
into a Chord with its tones inverted.

When spelling a reflected pitch, if the input Pitch is altered sharp, the reflection should prefer flats, and
vice versa.
This reflects a pitch across an axis producing an opposite pitch . Reflection alters this pitch by reference . It does not return a clone or a new Pitch .