Implementing cgmath.cs.