Trigononmetric improvements.

Change-Id: Ia44f2ccd5aef49bc1f2d5a7fbae20e7c82c94dd1