Y
yogi_bear_79
I have a double of unknown length that I need to split at the
decimal. I thought I would convert it either to a string or a char.
char seems to be the best since it easily lends itself to splitting.
I have a few issues with this theory. Hard codeing char M[6] works
fine for my test double -0.5 But I would like it to be more
versitile. The format "%2.2f" works fine with my test data, but that
should also be versitile.
inline void LineSegment:erpBisect(const double m, const Point p)
char M[6] ;
sprintf(M,"%2.2f",m);
decimal. I thought I would convert it either to a string or a char.
char seems to be the best since it easily lends itself to splitting.
I have a few issues with this theory. Hard codeing char M[6] works
fine for my test double -0.5 But I would like it to be more
versitile. The format "%2.2f" works fine with my test data, but that
should also be versitile.
inline void LineSegment:erpBisect(const double m, const Point p)
char M[6] ;
sprintf(M,"%2.2f",m);