Added second (optional) parameter to permit a reference direction for imaginary part to be provided, and thus a result in the full range -pi to pi.
Authored by: sangwine 2007-03-29
Parent: [r116]
Child: [r118]