Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Unified Diff: ui/gfx/geometry/vector3d_f.h

Issue 759063002: Move Screen Rotation from MaximizeModeController to ScreenOrientationController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Linux Compile Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/accelerometer/accelerometer_reader.cc ('k') | ui/gfx/geometry/vector3d_f.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/geometry/vector3d_f.h
diff --git a/ui/gfx/geometry/vector3d_f.h b/ui/gfx/geometry/vector3d_f.h
index 637b6d91807287dfbbfb242e8e03bf49d94ae0d4..4e0eaa412492205b14e8ddb63a1d60c9cee4c15b 100644
--- a/ui/gfx/geometry/vector3d_f.h
+++ b/ui/gfx/geometry/vector3d_f.h
@@ -120,6 +120,17 @@ inline Vector3dF ScaleVector3d(const Vector3dF& v, float scale) {
return ScaleVector3d(v, scale, scale, scale);
}
+// Returns the angle between |base| and |other| in degrees.
+GFX_EXPORT float AngleBetweenVectorsInDegrees(const gfx::Vector3dF& base,
+ const gfx::Vector3dF& other);
+
+// Returns the clockwise angle between |base| and |other| where |normal| is the
+// normal of the virtual surface to measure clockwise according to.
+GFX_EXPORT float ClockwiseAngleBetweenVectorsInDegrees(
+ const gfx::Vector3dF& base,
+ const gfx::Vector3dF& other,
+ const gfx::Vector3dF& normal);
+
// This is declared here for use in gtest-based unit tests but is defined in
// the gfx_test_support target. Depend on that to use this in your unit test.
// This should not be used in production code - call ToString() instead.
« no previous file with comments | « chromeos/accelerometer/accelerometer_reader.cc ('k') | ui/gfx/geometry/vector3d_f.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698