diff options
Diffstat (limited to 'externals/grill/deljoin')
-rw-r--r-- | externals/grill/deljoin/deljoin-help.pd (renamed from externals/grill/deljoin/help-deljoin.pd) | 0 | ||||
-rwxr-xr-x | externals/grill/deljoin/main.cpp | 12 |
2 files changed, 7 insertions, 5 deletions
diff --git a/externals/grill/deljoin/help-deljoin.pd b/externals/grill/deljoin/deljoin-help.pd index bf49460e..bf49460e 100644 --- a/externals/grill/deljoin/help-deljoin.pd +++ b/externals/grill/deljoin/deljoin-help.pd diff --git a/externals/grill/deljoin/main.cpp b/externals/grill/deljoin/main.cpp index d01e8fed..06d41d8b 100755 --- a/externals/grill/deljoin/main.cpp +++ b/externals/grill/deljoin/main.cpp @@ -130,11 +130,13 @@ void deljoin::m_list(const t_symbol *s,int argc,const t_atom *argv) const t_atom &a = argv[i]; if(IsSymbol(a)) strcpy(t,GetString(a)); - else if(IsInt(a)) { - STD::sprintf(t,"%i",GetInt(a),10); - } - else if(IsFloat(a)) { - STD::sprintf(t,"%f",GetFloat(a),10); + else if(CanbeFloat(a)) { + const float f = GetAFloat(a); + const int fi = (int)f; + if(f == fi) + STD::sprintf(t,"%i",fi,10); + else + STD::sprintf(t,"%f",f,10); } // else do nothing |