Translate part of goog.math