diff options
author | Erik Schnetter <schnetter@gmail.com> | 2013-04-19 22:17:42 -0400 |
---|---|---|
committer | Erik Schnetter <schnetter@gmail.com> | 2013-04-19 22:17:42 -0400 |
commit | d80c757f72f422778d19a4666edef2d02b604986 (patch) | |
tree | 36714a3b51b71b26c59d6ba5e3f3a86be2631cc4 /floatprops.h | |
parent | c925bb2db85933cbb680fe2ff6711dd4855446b3 (diff) | |
download | vecmathlib-d80c757f72f422778d19a4666edef2d02b604986.zip vecmathlib-d80c757f72f422778d19a4666edef2d02b604986.tar.gz |
Remove outdated, commented-out code to re-interpret bit patterns
Diffstat (limited to 'floatprops.h')
-rw-r--r-- | floatprops.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/floatprops.h b/floatprops.h index 3acd2d3..5d4dd24 100644 --- a/floatprops.h +++ b/floatprops.h @@ -189,18 +189,12 @@ namespace vecmathlib { // Re-interpret bit patterns static real_t as_float(int_t x) { - // return *(real_t*)&x; - // union { int_t i; real_t r; } ir; - // return ir.i=x, ir.r; real_t res; std::memcpy(&res, &x, sizeof res); return res; } static int_t as_int(real_t x) { - // return *(int_t*)&x; - // union { real_t r; int_t i; } ri; - // return ri.r=x, ri.i; int_t res; std::memcpy(&res, &x, sizeof res); return res; @@ -250,18 +244,12 @@ namespace vecmathlib { // Re-interpret bit patterns static real_t as_float(int_t x) { - // return *(real_t*)&x; - // union { int_t i; real_t r; } ir; - // return ir.i=x, ir.r; real_t res; std::memcpy(&res, &x, sizeof res); return res; } static int_t as_int(real_t x) { - // return *(int_t*)&x; - // union { real_t r; int_t i; } ri; - // return ri.r=x, ri.i; int_t res; std::memcpy(&res, &x, sizeof res); return res; |