Chromium Code Reviews| Index: webrtc/modules/audio_processing/beamformer/array_util.h |
| diff --git a/webrtc/modules/audio_processing/beamformer/array_util.h b/webrtc/modules/audio_processing/beamformer/array_util.h |
| index 8d1cda783ab435e235d3eab0acb3032aa802309b..9dcb1b200f34b3bdecba1647de83c17ce849166a 100644 |
| --- a/webrtc/modules/audio_processing/beamformer/array_util.h |
| +++ b/webrtc/modules/audio_processing/beamformer/array_util.h |
| @@ -35,7 +35,7 @@ struct CartesianPoint { |
| T c[3]; |
| }; |
| -typedef CartesianPoint<float> Point; |
| +using Point = CartesianPoint<float>; |
| template<typename T> |
| float Distance(CartesianPoint<T> a, CartesianPoint<T> b) { |
| @@ -44,6 +44,21 @@ float Distance(CartesianPoint<T> a, CartesianPoint<T> b) { |
| (a.z() - b.z()) * (a.z() - b.z())); |
| } |
| +template <typename T> |
| +struct SphericalPoint { |
| + SphericalPoint(T azimuth, T elevation, T distance) { |
|
Andrew MacDonald
2015/06/25 01:32:31
Michael used radius rather than distance elsewhere
|
| + s[0] = azimuth; |
| + s[1] = elevation; |
| + s[2] = distance; |
| + } |
| + T azimuth() const { return s[0]; } |
| + T elevation() const { return s[1]; } |
| + T distance() const { return s[2]; } |
| + T s[3]; |
| +}; |
| + |
| +using SphericalPointf = SphericalPoint<float>; |
|
Andrew MacDonald
2015/06/25 01:32:31
Just "using SphericalPoint" to be consistent with
|
| + |
| } // namespace webrtc |
| #endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_ARRAY_UTIL_H_ |