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

Unified Diff: ui/gfx/vector3d_f.h

Issue 12335009: Implementation of principal-component color reduction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
Index: ui/gfx/vector3d_f.h
diff --git a/ui/gfx/vector3d_f.h b/ui/gfx/vector3d_f.h
index bb93abdeaffb8d1e325123e65df121c27b1ea31f..bf48298ce78603d6102081ab946cc83ab0165807 100644
--- a/ui/gfx/vector3d_f.h
+++ b/ui/gfx/vector3d_f.h
@@ -104,8 +104,14 @@ inline Vector3dF CrossProduct(const Vector3dF& lhs, const Vector3dF& rhs) {
return result;
}
+// Return the dot product of two vectors with the second given as xyz.
+UI_EXPORT float DotProduct(const Vector3dF& lhs, float x, float y, float z);
+
// Return the dot product of two vectors.
-UI_EXPORT float DotProduct(const Vector3dF& lhs, const Vector3dF& rhs);
+inline float DotProduct(const Vector3dF& lhs, const Vector3dF& rhs) {
+ return DotProduct(lhs, rhs.x(), rhs.y(), rhs.z());
+}
+
// Return a vector that is |v| scaled by the given scale factors along each
// axis.

Powered by Google App Engine
This is Rietveld 408576698