pi/2 should be a constant and initialized in constructor (or even a static constant defined in some math package).