radare2/libr/util/float.c
pancake 9ca8e5b665 * Added '>' and '<' keys in visual
- implemented core_seek_align function
* Added '<' and '>' commands, but they are not yet working
  - Should be renamed to 'sa' (seek aligned)
* Fix hexdump ascii column color issue
* Fix print/t/hex hexample
* Add some dummy floating stuff for r_util
* Use IFDBG instead of custom 'D' in util/num.c
2009-03-12 12:30:32 +00:00

18 lines
345 B
C

/* radare - LGPL - Copyright 2007-2009 pancake<nopcode.org> */
#include "r_util.h"
int r_num_is_float(struct r_num_t *num, const char *str)
{
// TODO: also support 'f' terminated strings
return (int) strchr(str, '.');
}
double r_num_get_float(struct r_num_t *num, const char *str)
{
double d = 0.0f;
sscanf(str, "%lf", &d);
return d;
}