From 7a798253441a8bd499d36bd8153b92ab08de8a9f Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 2 Dec 2021 11:41:42 +0800 Subject: *fixed --- Client/Source/float2fixed/main.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Client/Source/float2fixed/main.cpp (limited to 'Client/Source/float2fixed') diff --git a/Client/Source/float2fixed/main.cpp b/Client/Source/float2fixed/main.cpp new file mode 100644 index 0000000..5c4fa40 --- /dev/null +++ b/Client/Source/float2fixed/main.cpp @@ -0,0 +1,17 @@ +#include "fpm/include/fpm/fixed.hpp" +#include "fpm/include/fpm/ios.hpp" +#include + +using namespace std; + +typedef fpm::fixed_16_16 fixed16; + +int main() +{ + fixed16 n = 0.95f; + cout << n.raw_value(); + + getchar(); + + return 0; +} \ No newline at end of file -- cgit v1.1-26-g67d0