commit | 7b4516e7ea552ad08d6e7277d311ef11bd8f12e8 | [log] [tgz] |
---|---|---|
author | ztenghui <ztenghui@google.com> | Tue Jan 07 10:42:55 2014 -0800 |
committer | ztenghui <ztenghui@google.com> | Fri Jan 10 17:18:53 2014 -0800 |
tree | a97549bff020af39946aabd5a5c27c1151a90539 | |
parent | 0ffd9ca5798d6c55d2a02f453dd181899639dce2 [diff] [blame] |
Calculate and show the shadow from a spot light. Change-Id: Ia558852e8cde5d33866b22875eb501e4c6858819
diff --git a/libs/hwui/Vector.h b/libs/hwui/Vector.h index 5110272..15b9d6b 100644 --- a/libs/hwui/Vector.h +++ b/libs/hwui/Vector.h
@@ -36,6 +36,10 @@ x(px), y(py) { } + float lengthSquared() const { + return x * x + y * y; + } + float length() const { return sqrt(x * x + y * y); }