From: Erik Charlebois Date: Sun, 12 May 2013 02:01:00 +0000 (-0400) Subject: VM: Refactor float_bits.hpp to Factor style X-Git-Tag: 0.97~1294 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=83b69d45f89913b66d2b07a4df1260ab61fc26c7 VM: Refactor float_bits.hpp to Factor style --- diff --git a/vm/float_bits.hpp b/vm/float_bits.hpp index 73a04639ee..f2b061dda0 100644 --- a/vm/float_bits.hpp +++ b/vm/float_bits.hpp @@ -1,45 +1,40 @@ -namespace factor -{ +namespace factor { /* Some functions for converting floating point numbers to binary representations and vice versa */ union double_bits_pun { - double x; - u64 y; + double x; + u64 y; }; -inline static u64 double_bits(double x) -{ - double_bits_pun b; - b.x = x; - return b.y; +inline static u64 double_bits(double x) { + double_bits_pun b; + b.x = x; + return b.y; } -inline static double bits_double(u64 y) -{ - double_bits_pun b; - b.y = y; - return b.x; +inline static double bits_double(u64 y) { + double_bits_pun b; + b.y = y; + return b.x; } union float_bits_pun { - float x; - u32 y; + float x; + u32 y; }; -inline static u32 float_bits(float x) -{ - float_bits_pun b; - b.x = x; - return b.y; +inline static u32 float_bits(float x) { + float_bits_pun b; + b.x = x; + return b.y; } -inline static float bits_float(u32 y) -{ - float_bits_pun b; - b.y = y; - return b.x; +inline static float bits_float(u32 y) { + float_bits_pun b; + b.y = y; + return b.x; } }