| Index: ui/gfx/geometry/vector3d_f.cc
|
| diff --git a/ui/gfx/geometry/vector3d_f.cc b/ui/gfx/geometry/vector3d_f.cc
|
| index ddeafe5ee6f2bf142c8ee999bbb8deba9133d329..a834047215cf6ac6954ae1e953ab6369df95c854 100644
|
| --- a/ui/gfx/geometry/vector3d_f.cc
|
| +++ b/ui/gfx/geometry/vector3d_f.cc
|
| @@ -50,9 +50,12 @@ void Vector3dF::Scale(float x_scale, float y_scale, float z_scale) {
|
| }
|
|
|
| void Vector3dF::Cross(const Vector3dF& other) {
|
| - float x = y_ * other.z() - z_ * other.y();
|
| - float y = z_ * other.x() - x_ * other.z();
|
| - float z = x_ * other.y() - y_ * other.x();
|
| + double dx = x_;
|
| + double dy = y_;
|
| + double dz = z_;
|
| + float x = static_cast<float>(dy * other.z() - dz * other.y());
|
| + float y = static_cast<float>(dz * other.x() - dx * other.z());
|
| + float z = static_cast<float>(dx * other.y() - dy * other.x());
|
| x_ = x;
|
| y_ = y;
|
| z_ = z;
|
|
|