diff options
author | 2011-02-17 17:37:11 +0100 | |
---|---|---|
committer | 2011-02-17 17:37:11 +0100 | |
commit | aea630a98a39a523bfb008e884262d69ee473b8d (patch) | |
tree | 9af0e1ae346bc2e07568fd8c155013986dcfe34a /Eigen/src/plugins | |
parent | 2ba55e90db84d33c83fd9aaaa42004d211779a1d (diff) |
factorize implementation of standard real unary math functions, and add acos, asin
Diffstat (limited to 'Eigen/src/plugins')
-rw-r--r-- | Eigen/src/plugins/ArrayCwiseUnaryOps.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/Eigen/src/plugins/ArrayCwiseUnaryOps.h b/Eigen/src/plugins/ArrayCwiseUnaryOps.h index 7e0c827db..0dffaf413 100644 --- a/Eigen/src/plugins/ArrayCwiseUnaryOps.h +++ b/Eigen/src/plugins/ArrayCwiseUnaryOps.h @@ -70,7 +70,7 @@ sqrt() const * Example: \include Cwise_cos.cpp * Output: \verbinclude Cwise_cos.out * - * \sa sin(), exp() + * \sa sin(), acos() */ inline const CwiseUnaryOp<internal::scalar_cos_op<Scalar>, const Derived> cos() const @@ -84,7 +84,7 @@ cos() const * Example: \include Cwise_sin.cpp * Output: \verbinclude Cwise_sin.out * - * \sa cos(), exp() + * \sa cos(), asin() */ inline const CwiseUnaryOp<internal::scalar_sin_op<Scalar>, const Derived> sin() const @@ -92,6 +92,31 @@ sin() const return derived(); } +/** \returns an expression of the coefficient-wise arc cosine of *this. + * + * Example: \include Cwise_acos.cpp + * Output: \verbinclude Cwise_acos.out + * + * \sa cos(), asin() + */ +inline const CwiseUnaryOp<internal::scalar_acos_op<Scalar>, const Derived> +acos() const +{ + return derived(); +} + +/** \returns an expression of the coefficient-wise arc sine of *this. + * + * Example: \include Cwise_asin.cpp + * Output: \verbinclude Cwise_asin.out + * + * \sa sin(), acos() + */ +inline const CwiseUnaryOp<internal::scalar_asin_op<Scalar>, const Derived> +asin() const +{ + return derived(); +} /** \returns an expression of the coefficient-wise tan of *this. * |