diff options
author | scuri <scuri> | 2009-10-01 02:56:38 +0000 |
---|---|---|
committer | scuri <scuri> | 2009-10-01 02:56:38 +0000 |
commit | 62783aee16f96fe5e513fb230b8efddaa02981df (patch) | |
tree | 9dc512b0c758025c5cddba9709420f1bf9058675 /include/im_complex.h | |
parent | 9a5e93213e08601a58725f44035ac622fb68e849 (diff) |
New: functions imProcessUnsharp and imProcessSharp.
Changed: now imProcessUnArithmeticOp, imProcessArithmeticConstOp and imProcessArithmeticOp willl crop the result to 0-255 if destiny has data type byte.
Changed: removed IM_UN_INC operation from imProcessUnArithmeticOp. It was not an unary operation. Can simply be done in place by imProcessArithmeticOp and IM_BIN_ADD.
Diffstat (limited to 'include/im_complex.h')
-rw-r--r-- | include/im_complex.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/im_complex.h b/include/im_complex.h index 2ac4d92..1328dd5 100644 --- a/include/im_complex.h +++ b/include/im_complex.h @@ -54,6 +54,26 @@ inline int operator <= (const imcfloat& C, const float& F) return ((F <= C.real) && (0 <= C.imag)); } +inline int operator < (const imcfloat& C1, const imcfloat& C2) +{ + return ((C1.real < C2.real) && (C1.imag < C2.imag)); +} + +inline int operator < (const imcfloat& C, const float& F) +{ + return ((F < C.real) && (0 < C.imag)); +} + +inline int operator > (const imcfloat& C1, const imcfloat& C2) +{ + return ((C1.real > C2.real) && (C1.imag > C2.imag)); +} + +inline int operator > (const imcfloat& C, const float& F) +{ + return ((F > C.real) && (0 > C.imag)); +} + inline imcfloat operator + (const imcfloat& C1, const imcfloat& C2) { return imcfloat(C1.real + C2.real, C1.imag + C2.imag); |