diff options
| author | mcecchetti <mcecchetti@users.sourceforge.net> | 2008-07-06 15:36:49 +0000 |
|---|---|---|
| committer | mcecchetti <mcecchetti@users.sourceforge.net> | 2008-07-06 15:36:49 +0000 |
| commit | 6a0c5250c76404facef504f9e148ce99e05610d5 (patch) | |
| tree | 28aa9f309d509853fae58b61884c5c0cc2cc85fd /src/2geom/numeric/vector.h | |
| parent | agree with the FIXME (diff) | |
| download | inkscape-6a0c5250c76404facef504f9e148ce99e05610d5.tar.gz inkscape-6a0c5250c76404facef504f9e148ce99e05610d5.zip | |
modified is_positive and is_negative implementation for Vector and Matrix in order to make 2geom linkable with a gsl release >= 1.8
(bzr r6197)
Diffstat (limited to 'src/2geom/numeric/vector.h')
| -rw-r--r-- | src/2geom/numeric/vector.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/2geom/numeric/vector.h b/src/2geom/numeric/vector.h index 3e53405f4..04c133372 100644 --- a/src/2geom/numeric/vector.h +++ b/src/2geom/numeric/vector.h @@ -73,12 +73,20 @@ class BaseVectorImpl bool is_positive() const { - return gsl_vector_ispos(m_vector); + for ( size_t i = 0; i < size(); ++i ) + { + if ( (*this)[i] <= 0 ) return false; + } + return true; } bool is_negative() const { - return gsl_vector_isneg(m_vector); + for ( size_t i = 0; i < size(); ++i ) + { + if ( (*this)[i] >= 0 ) return false; + } + return true; } bool is_non_negative() const |
