mirror of
https://github.com/ArashPartow/exprtk.git
synced 2025-06-12 16:27:23 +00:00
C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html
This commit is contained in:
@ -793,7 +793,7 @@ namespace exprtk
|
||||
template <typename T>
|
||||
inline T abs_impl(const T v, real_type_tag)
|
||||
{
|
||||
return ((v >= T(0)) ? v : -v);
|
||||
return ((v < T(0)) ? -v : v);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@ -11128,13 +11128,14 @@ namespace exprtk
|
||||
struct OpName##_op \
|
||||
{ \
|
||||
typedef typename functor_t<T>::Type Type; \
|
||||
typedef typename expression_node<T>::node_type node_t; \
|
||||
\
|
||||
static inline T process(Type v) \
|
||||
{ \
|
||||
return numeric:: OpName (v); \
|
||||
} \
|
||||
\
|
||||
static inline typename expression_node<T>::node_type type() \
|
||||
static inline node_t type() \
|
||||
{ \
|
||||
return expression_node<T>::e_##OpName; \
|
||||
} \
|
||||
|
Reference in New Issue
Block a user