C++ Mathematical Expression Library (ExprTk) https://www.partow.net/programming/exprtk/index.html
This commit is contained in:
parent
98006471f3
commit
7bc2b30e8f
|
@ -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; \
|
||||
} \
|
||||
|
|
Loading…
Reference in New Issue