git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@1008
a5681a0c-68f1-0310-ab6d-
d61299d08faa
Convert angle in degrees to radians, or radians to degrees.
+B<ABS>
+
+Take the absolute value.
+
=item Set Operations
B<SORT, REV>
add_op(OP_RAD2DEG,RAD2DEG)
add_op(OP_DEG2RAD,DEG2RAD)
add_op(OP_AVG,AVG)
+ add_op(OP_ABS,ABS)
#undef add_op
}
(*str)[offset] = '\0';
match_op(OP_RAD2DEG,RAD2DEG)
match_op(OP_DEG2RAD,DEG2RAD)
match_op(OP_AVG,AVG)
+ match_op(OP_ABS,ABS)
#undef match_op
}
}
break;
+ case OP_ABS:
+ stackunderflow(0);
+ rpnstack -> s[stptr] = fabs(rpnstack -> s[stptr]);
+ break;
case OP_END:
break;
}
OP_UN,OP_END,OP_LTIME,OP_NE,OP_ISINF,OP_PREV_OTHER,OP_COUNT,
OP_ATAN,OP_SQRT,OP_SORT,OP_REV,OP_TREND,
OP_ATAN2,OP_RAD2DEG,OP_DEG2RAD,
- OP_AVG};
+ OP_AVG,OP_ABS};
typedef struct rpnp_t {
enum op_en op;