Changeset 31660 for trunk/psLib/src/math/psVectorSmooth.c
- Timestamp:
- Jun 22, 2011, 12:27:33 AM (15 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psVectorSmooth.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psVectorSmooth.c
r15959 r31660 30 30 if (output == input) { 31 31 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Cannot smooth vector in-place."); 32 return false;32 return NULL; 33 33 } 34 34 … … 38 38 long Nbin = input->n; // Number of elements 39 39 double factor = -0.5/(sigma*sigma); // Factor for Gaussian 40 41 if (Nbin < Npixel) { 42 // cannot smooth narrow vector 43 return NULL; 44 } 40 45 41 46 #define VECTOR_SMOOTH_CASE(TYPE) \ … … 60 65 /* smooth first Nrange pixels, with renorm */ \ 61 66 /* XXX need to check that this does not run over end for narrow vectors */ \ 62 for (long i = 0; i < Nrange; i++, vi++, vo++) { \67 for (long i = 0; i < Nrange; i++, vi++, vo++) { \ 63 68 ps##TYPE *vr = vi - i; \ 64 69 ps##TYPE *vg = gauss - i; \
Note:
See TracChangeset
for help on using the changeset viewer.
