Handled case for perpendicular neurons.

Handled case when input neuron is perpendicular to one of the stored patterns.