Add Cast and MathUtils.

Change-Id: I3205e6f6182865499d957cc2d1bb5784a58cb8ec