OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CCMathUtil_h | 5 #ifndef CCMathUtil_h |
6 #define CCMathUtil_h | 6 #define CCMathUtil_h |
7 | 7 |
8 #include "FloatPoint.h" | 8 #include "FloatPoint.h" |
9 #include "FloatPoint3D.h" | 9 #include "FloatPoint3D.h" |
10 | 10 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 static FloatPoint projectPoint(const WebKit::WebTransformationMatrix&, const
FloatPoint&, bool& clipped); | 93 static FloatPoint projectPoint(const WebKit::WebTransformationMatrix&, const
FloatPoint&, bool& clipped); |
94 | 94 |
95 static void flattenTransformTo2d(WebKit::WebTransformationMatrix&); | 95 static void flattenTransformTo2d(WebKit::WebTransformationMatrix&); |
96 | 96 |
97 // Returns the smallest angle between the given two vectors in degrees. Neit
her vector is | 97 // Returns the smallest angle between the given two vectors in degrees. Neit
her vector is |
98 // assumed to be normalized. | 98 // assumed to be normalized. |
99 static float smallestAngleBetweenVectors(const FloatSize&, const FloatSize&)
; | 99 static float smallestAngleBetweenVectors(const FloatSize&, const FloatSize&)
; |
100 | 100 |
101 // Projects the |source| vector onto |destination|. Neither vector is assume
d to be normalized. | 101 // Projects the |source| vector onto |destination|. Neither vector is assume
d to be normalized. |
102 static FloatSize projectVector(const FloatSize& source, const FloatSize& des
tination); | 102 static FloatSize projectVector(const FloatSize& source, const FloatSize& des
tination); |
| 103 |
| 104 static float distanceBetweenPoints(const FloatPoint&, const FloatPoint&); |
103 }; | 105 }; |
104 | 106 |
105 } // namespace cc | 107 } // namespace cc |
106 | 108 |
107 #endif // #define CCMathUtil_h | 109 #endif // #define CCMathUtil_h |
OLD | NEW |