diff options
Diffstat (limited to 'thirdparty')
-rw-r--r-- | thirdparty/README.md | 21 | ||||
-rw-r--r-- | thirdparty/fonts/Hack_Regular.ttf | bin | 399724 -> 307420 bytes | |||
-rw-r--r-- | thirdparty/fonts/LICENSE_Hack.md | 57 | ||||
-rw-r--r-- | thirdparty/libvpx/vpx_dsp/x86/vpx_subpixel_8t_intrin_avx2.c | 5 | ||||
-rw-r--r-- | thirdparty/squish/Add-Decompress-Bc5-to-Squish.patch | 143 | ||||
-rw-r--r-- | thirdparty/squish/colourblock.cpp | 85 | ||||
-rw-r--r-- | thirdparty/squish/colourblock.h | 3 | ||||
-rw-r--r-- | thirdparty/squish/squish.cpp | 8 | ||||
-rw-r--r-- | thirdparty/thekla_atlas/nvcore/Debug.cpp | 14 | ||||
-rw-r--r-- | thirdparty/thekla_atlas/nvcore/DefsGnucWin32.h | 2 | ||||
-rw-r--r-- | thirdparty/thekla_atlas/nvmath/ftoi.h | 5 | ||||
-rw-r--r-- | thirdparty/thekla_atlas/nvmath/nvmath.h | 17 |
12 files changed, 310 insertions, 50 deletions
diff --git a/thirdparty/README.md b/thirdparty/README.md index dd931b2fcb..62690e21c7 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -62,8 +62,8 @@ Use UI font if exists, because it has tight vertical metrics and good for UI. ### Hack Regular - Upstream: https://github.com/source-foundry/Hack -- Version: 2.020 -- License: Hack Open Font License v2.0 +- Version: 3.000 +- License: MIT + Bitstream Vera License ### DroidSans*.ttf @@ -179,6 +179,9 @@ Files extracted from upstream source: TODO. +Important: File `libvpx/vpx_dsp/x86/vpx_subpixel_8t_intrin_avx2.c` has +Godot-made change marked with `// -- GODOT --` comments. + ## libwebp @@ -269,7 +272,7 @@ Collection of single-file libraries used in Godot components. ### poshlib - Upstream: http://poshlib.hookatooka.com/poshlib/trac.cgi (username guest, password guest123) -- Version: 1.3.002 +- Version: 1.3.002 - License: MIT Files extracted from the upstream source: @@ -305,6 +308,10 @@ Files extracted from the upstream source: - Relevant sources from src/ - License.txt +Important: Some files have Godot-made changes, those +changes are marked with `// -- GODOT --` comments. + + ## nanosvg - Upstream: https://github.com/memononen/nanosvg @@ -358,6 +365,7 @@ Files extracted from upstream source: - celt/ and silk/ subfolders - COPYING + ## pcre2 - Upstream: http://www.pcre.org/ @@ -371,6 +379,7 @@ Files extracted from upstream source: - src/pcre2_jit_*.c and src/sljit/* - AUTHORS and COPYING + ## pvrtccompressor - Upstream: https://bitbucket.org/jthlim/pvrtccompressor @@ -382,12 +391,14 @@ Files extracted from upstream source: - all .cpp and .h files apart from `main.cpp` - LICENSE.TXT + ## recastnavigation - Upstream: https://github.com/recastnavigation/recastnavigation - version: git commit ef3ea40f - 2016-02-06 - License: zlib + ## rtaudio - Upstream: http://www.music.mcgill.ca/~gary/rtaudio/ @@ -409,6 +420,10 @@ Files extracted from upstream source: - all .cpp, .h and .inl files +Important: Some files have Godot-made changes. +They are marked with `// -- GODOT start --` and `// -- GODOT end --` +comments and a patch is provided in the squish/ folder. + ## tinyexr diff --git a/thirdparty/fonts/Hack_Regular.ttf b/thirdparty/fonts/Hack_Regular.ttf Binary files differindex a35ea2e4f4..f342700811 100644 --- a/thirdparty/fonts/Hack_Regular.ttf +++ b/thirdparty/fonts/Hack_Regular.ttf diff --git a/thirdparty/fonts/LICENSE_Hack.md b/thirdparty/fonts/LICENSE_Hack.md index e9fc8a1f87..ddd23a2b81 100644 --- a/thirdparty/fonts/LICENSE_Hack.md +++ b/thirdparty/fonts/LICENSE_Hack.md @@ -1,49 +1,30 @@ -## License +The work in the Hack project is Copyright 2017 Source Foundry Authors and licensed under the MIT License -Hack Copyright 2015, Christopher Simpkins with Reserved Font Name "Hack". +The work in the DejaVu project was committed to the public domain. Bitstream Vera Sans Mono Copyright 2003 Bitstream Inc. and licensed under the Bitstream Vera License with Reserved Font Names "Bitstream" and "Vera" -DejaVu modifications of the original Bitstream Vera Sans Mono typeface have been committed to the public domain. +### MIT License +Copyright (c) 2017 Source Foundry Authors +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -This Font Software is licensed under the Hack Open Font License v2.0 and the Bitstream Vera License. - -These licenses are copied below. - - -### Hack Open Font License v2.0 - -(Version 1.0 - 06 September 2015) - -(Version 2.0 - 27 September 2015) - -Copyright 2015 by Christopher Simpkins. All Rights Reserved. - -DEFINITIONS - -"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. - -PERMISSION AND CONDITIONS - -Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated source code, documentation, and binary files (the "Font Software"), to reproduce and distribute the modifications to the Bitstream Vera Font Software, including without limitation the rights to use, study, copy, merge, embed, modify, redistribute, and/or sell modified or unmodified copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: - -(1) The above copyright notice and this permission notice shall be included in all modified and unmodified copies of the Font Software typefaces. These notices can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. - -(2) The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing the word "Hack". - -(3) Neither the Font Software nor any of its individual components, in original or modified versions, may be sold by itself. - -TERMINATION - -This license becomes null and void if any of the above conditions are not met. - -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. - -Except as contained in this notice, the names of Christopher Simpkins and the Author(s) of the Font Software shall not be used to promote, endorse or advertise any modified version, except to acknowledge the contribution(s) of Christopher Simpkins and the Author(s) or with their explicit written permission. For further information, contact: chris at sourcefoundry dot org. - +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ### BITSTREAM VERA LICENSE diff --git a/thirdparty/libvpx/vpx_dsp/x86/vpx_subpixel_8t_intrin_avx2.c b/thirdparty/libvpx/vpx_dsp/x86/vpx_subpixel_8t_intrin_avx2.c index b718678537..d8a92354c9 100644 --- a/thirdparty/libvpx/vpx_dsp/x86/vpx_subpixel_8t_intrin_avx2.c +++ b/thirdparty/libvpx/vpx_dsp/x86/vpx_subpixel_8t_intrin_avx2.c @@ -40,11 +40,12 @@ DECLARE_ALIGNED(32, static const uint8_t, filt4_global_avx2[32]) = { }; #if defined(__clang__) +// -- GODOT start - # if __clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ <= 3) || \ - (defined(__APPLE__) && \ + (!defined(__MACPORTS__) && defined(__APPLE__) && \ ((__clang_major__ == 4 && __clang_minor__ <= 2) || \ (__clang_major__ == 5 && __clang_minor__ == 0))) - +// -- GODOT end -- # define MM256_BROADCASTSI128_SI256(x) \ _mm_broadcastsi128_si256((__m128i const *)&(x)) # else // clang > 3.3, and not 5.0 on macosx. diff --git a/thirdparty/squish/Add-Decompress-Bc5-to-Squish.patch b/thirdparty/squish/Add-Decompress-Bc5-to-Squish.patch new file mode 100644 index 0000000000..1e06a8d318 --- /dev/null +++ b/thirdparty/squish/Add-Decompress-Bc5-to-Squish.patch @@ -0,0 +1,143 @@ +From 7b64cc4c8b0be0443741483bf65909f5140179c0 Mon Sep 17 00:00:00 2001 +From: Orkun <orkuntezerm@gmail.com> +Date: Sun, 19 Nov 2017 02:24:31 +0300 +Subject: [PATCH] Fix #12220: Add Decompress Bc5 to Squish + +This Commit fixes the corrupted file preview described in #12220. +Added DecompressColourBc5 function to squish. +--- + thirdparty/squish/colourblock.cpp | 85 +++++++++++++++++++++++++++++++++++++++ + thirdparty/squish/colourblock.h | 3 ++ + thirdparty/squish/squish.cpp | 8 +++- + 3 files changed, 95 insertions(+), 1 deletion(-) + +diff --git a/thirdparty/squish/colourblock.cpp b/thirdparty/squish/colourblock.cpp +index af8b98036..3de46382c 100644 +--- a/thirdparty/squish/colourblock.cpp ++++ b/thirdparty/squish/colourblock.cpp +@@ -211,4 +211,89 @@ void DecompressColour( u8* rgba, void const* block, bool isDxt1 ) + } + } + ++// -- Godot start -- ++void DecompressColourBc5( u8* rgba, void const* block) ++{ ++ // get the block bytes ++ u8 const* bytes = reinterpret_cast< u8 const* >( block ); ++ ++ // unpack the endpoints ++ u8 codes[16]; ++ int red_0 = bytes[0]; ++ int red_1 = bytes[1]; ++ ++ codes[0] = red_0; ++ codes[1] = red_1; ++ codes[6] = 0.0f; ++ codes[7] = 1.0f; ++ // generate the midpoints ++ if(red_0 > red_1) ++ { ++ for( int i = 2; i < 8; ++i ) ++ { ++ codes[i] = ((8-i)*red_0 + (i-1)*red_1)/7; ++ } ++ } ++ else ++ { ++ for( int i = 2; i < 6; ++i ) ++ { ++ codes[i] = ((6-i)*red_0 + (i-1)*red_1)/5; ++ } ++ } ++ ++ int green_0 = bytes[8]; ++ int green_1 = bytes[9]; ++ ++ codes[0 + 8] = green_0; ++ codes[1 + 8] = green_1; ++ codes[6 + 8] = 0.0f; ++ codes[7 + 8] = 1.0f; ++ // generate the midpoints ++ if(green_0 > green_1) ++ { ++ for( int i = 2; i < 8; ++i ) ++ { ++ codes[i + 8] = ((8-i)*green_0 + (i-1)*green_1)/7; ++ } ++ } ++ else ++ { ++ for( int i = 2; i < 6; ++i ) ++ { ++ codes[i + 8] = ((6-i)*green_0 + (i-1)*green_1)/5; ++ } ++ } ++ ++ u8 indices[32]; ++ for( int i = 0; i < 4; ++i ) ++ { ++ u8 packed = bytes[2 + i]; ++ u8* red_ind = indices + 4*i; ++ ++ red_ind[0] = packed & 0x3; ++ red_ind[1] = ( packed >> 2 ) & 0x3; ++ red_ind[2] = ( packed >> 4 ) & 0x3; ++ red_ind[3] = ( packed >> 6 ) & 0x3; ++ ++ packed = bytes[8 + i]; ++ u8* green_ind = indices + 4*i + 16; ++ green_ind[0] = packed & 0x3; ++ green_ind[1] = ( packed >> 2 ) & 0x3; ++ green_ind[2] = ( packed >> 4 ) & 0x3; ++ green_ind[3] = ( packed >> 6 ) & 0x3; ++ } ++ ++ // store out the colours ++ for( int i = 0; i < 16; ++i ) ++ { ++ rgba[4*i] = codes[indices[i]]; ++ rgba[4*i +1] = codes[indices[i + 16] + 8]; ++ rgba[4*i +2] = 0; ++ rgba[4*i +3] = 255; ++ } ++} ++// -- GODOT end -- ++ ++ + } // namespace squish +diff --git a/thirdparty/squish/colourblock.h b/thirdparty/squish/colourblock.h +index fee2cd7c5..3cb9b7e3b 100644 +--- a/thirdparty/squish/colourblock.h ++++ b/thirdparty/squish/colourblock.h +@@ -35,6 +35,9 @@ void WriteColourBlock3( Vec3::Arg start, Vec3::Arg end, u8 const* indices, void* + void WriteColourBlock4( Vec3::Arg start, Vec3::Arg end, u8 const* indices, void* block ); + + void DecompressColour( u8* rgba, void const* block, bool isDxt1 ); ++// -- GODOT start -- ++void DecompressColourBc5( u8* rgba, void const* block ); ++// -- GODOT end -- + + } // namespace squish + +diff --git a/thirdparty/squish/squish.cpp b/thirdparty/squish/squish.cpp +index 1d22a64ad..fd11a147d 100644 +--- a/thirdparty/squish/squish.cpp ++++ b/thirdparty/squish/squish.cpp +@@ -135,7 +135,13 @@ void Decompress( u8* rgba, void const* block, int flags ) + colourBlock = reinterpret_cast< u8 const* >( block ) + 8; + + // decompress colour +- DecompressColour( rgba, colourBlock, ( flags & kDxt1 ) != 0 ); ++ // -- GODOT start -- ++ //DecompressColour( rgba, colourBlock, ( flags & kDxt1 ) != 0 ); ++ if(( flags & ( kBc5 ) ) != 0) ++ DecompressColourBc5( rgba, colourBlock); ++ else ++ DecompressColour( rgba, colourBlock, ( flags & kDxt1 ) != 0 ); ++ // -- GODOT end -- + + // decompress alpha separately if necessary + if( ( flags & kDxt3 ) != 0 ) +-- +2.13.6 + diff --git a/thirdparty/squish/colourblock.cpp b/thirdparty/squish/colourblock.cpp index af8b980365..3de46382c0 100644 --- a/thirdparty/squish/colourblock.cpp +++ b/thirdparty/squish/colourblock.cpp @@ -211,4 +211,89 @@ void DecompressColour( u8* rgba, void const* block, bool isDxt1 ) } } +// -- Godot start -- +void DecompressColourBc5( u8* rgba, void const* block) +{ + // get the block bytes + u8 const* bytes = reinterpret_cast< u8 const* >( block ); + + // unpack the endpoints + u8 codes[16]; + int red_0 = bytes[0]; + int red_1 = bytes[1]; + + codes[0] = red_0; + codes[1] = red_1; + codes[6] = 0.0f; + codes[7] = 1.0f; + // generate the midpoints + if(red_0 > red_1) + { + for( int i = 2; i < 8; ++i ) + { + codes[i] = ((8-i)*red_0 + (i-1)*red_1)/7; + } + } + else + { + for( int i = 2; i < 6; ++i ) + { + codes[i] = ((6-i)*red_0 + (i-1)*red_1)/5; + } + } + + int green_0 = bytes[8]; + int green_1 = bytes[9]; + + codes[0 + 8] = green_0; + codes[1 + 8] = green_1; + codes[6 + 8] = 0.0f; + codes[7 + 8] = 1.0f; + // generate the midpoints + if(green_0 > green_1) + { + for( int i = 2; i < 8; ++i ) + { + codes[i + 8] = ((8-i)*green_0 + (i-1)*green_1)/7; + } + } + else + { + for( int i = 2; i < 6; ++i ) + { + codes[i + 8] = ((6-i)*green_0 + (i-1)*green_1)/5; + } + } + + u8 indices[32]; + for( int i = 0; i < 4; ++i ) + { + u8 packed = bytes[2 + i]; + u8* red_ind = indices + 4*i; + + red_ind[0] = packed & 0x3; + red_ind[1] = ( packed >> 2 ) & 0x3; + red_ind[2] = ( packed >> 4 ) & 0x3; + red_ind[3] = ( packed >> 6 ) & 0x3; + + packed = bytes[8 + i]; + u8* green_ind = indices + 4*i + 16; + green_ind[0] = packed & 0x3; + green_ind[1] = ( packed >> 2 ) & 0x3; + green_ind[2] = ( packed >> 4 ) & 0x3; + green_ind[3] = ( packed >> 6 ) & 0x3; + } + + // store out the colours + for( int i = 0; i < 16; ++i ) + { + rgba[4*i] = codes[indices[i]]; + rgba[4*i +1] = codes[indices[i + 16] + 8]; + rgba[4*i +2] = 0; + rgba[4*i +3] = 255; + } +} +// -- GODOT end -- + + } // namespace squish diff --git a/thirdparty/squish/colourblock.h b/thirdparty/squish/colourblock.h index fee2cd7c5d..3cb9b7e3b9 100644 --- a/thirdparty/squish/colourblock.h +++ b/thirdparty/squish/colourblock.h @@ -35,6 +35,9 @@ void WriteColourBlock3( Vec3::Arg start, Vec3::Arg end, u8 const* indices, void* void WriteColourBlock4( Vec3::Arg start, Vec3::Arg end, u8 const* indices, void* block ); void DecompressColour( u8* rgba, void const* block, bool isDxt1 ); +// -- GODOT start -- +void DecompressColourBc5( u8* rgba, void const* block ); +// -- GODOT end -- } // namespace squish diff --git a/thirdparty/squish/squish.cpp b/thirdparty/squish/squish.cpp index 1d22a64ad6..fd11a147de 100644 --- a/thirdparty/squish/squish.cpp +++ b/thirdparty/squish/squish.cpp @@ -135,7 +135,13 @@ void Decompress( u8* rgba, void const* block, int flags ) colourBlock = reinterpret_cast< u8 const* >( block ) + 8; // decompress colour - DecompressColour( rgba, colourBlock, ( flags & kDxt1 ) != 0 ); + // -- GODOT start -- + //DecompressColour( rgba, colourBlock, ( flags & kDxt1 ) != 0 ); + if(( flags & ( kBc5 ) ) != 0) + DecompressColourBc5( rgba, colourBlock); + else + DecompressColour( rgba, colourBlock, ( flags & kDxt1 ) != 0 ); + // -- GODOT end -- // decompress alpha separately if necessary if( ( flags & kDxt3 ) != 0 ) diff --git a/thirdparty/thekla_atlas/nvcore/Debug.cpp b/thirdparty/thekla_atlas/nvcore/Debug.cpp index 113c551de8..4980ffa916 100644 --- a/thirdparty/thekla_atlas/nvcore/Debug.cpp +++ b/thirdparty/thekla_atlas/nvcore/Debug.cpp @@ -14,6 +14,7 @@ # define VC_EXTRALEAN # include <windows.h> # include <direct.h> +// -- GODOT start - # include <crtdbg.h> # if _MSC_VER < 1300 # define DECLSPEC_DEPRECATED @@ -24,6 +25,7 @@ // VC7: ships with updated headers # include <dbghelp.h> # endif +// -- GODOT end - # pragma comment(lib,"dbghelp.lib") #endif @@ -107,8 +109,9 @@ namespace #endif - +// -- GODOT start - #if NV_OS_WIN32 || NV_OS_DURANGO +// -- GODOT end - // We should try to simplify the top level filter as much as possible. // http://www.nynaeve.net/?p=128 @@ -391,8 +394,10 @@ namespace #pragma warning(disable:4748) static NV_NOINLINE int backtrace(void * trace[], int maxcount) { CONTEXT ctx = { 0 }; +// -- GODOT start -- #if NV_CPU_X86 && !NV_CPU_X86_64 ctx.ContextFlags = CONTEXT_CONTROL; +#if NV_CC_MSVC _asm { call x x: pop eax @@ -401,6 +406,13 @@ namespace mov ctx.Esp, esp } #else + register long unsigned int ebp asm("ebp"); + ctx.Eip = (DWORD) __builtin_return_address(0); + ctx.Ebp = ebp; + ctx.Esp = (DWORD) __builtin_frame_address(0); +#endif +// -- GODOT end -- +#else RtlCaptureContext(&ctx); // Not implemented correctly in x86. #endif diff --git a/thirdparty/thekla_atlas/nvcore/DefsGnucWin32.h b/thirdparty/thekla_atlas/nvcore/DefsGnucWin32.h index 4f97b90f3a..e1c8d6e4f8 100644 --- a/thirdparty/thekla_atlas/nvcore/DefsGnucWin32.h +++ b/thirdparty/thekla_atlas/nvcore/DefsGnucWin32.h @@ -19,7 +19,9 @@ #endif #define NV_FASTCALL __attribute__((fastcall)) +// -- GODOT start - #define NV_FORCEINLINE __attribute__((always_inline)) inline +// -- GODOT end - #define NV_DEPRECATED __attribute__((deprecated)) #if __GNUC__ > 2 diff --git a/thirdparty/thekla_atlas/nvmath/ftoi.h b/thirdparty/thekla_atlas/nvmath/ftoi.h index bee15c0908..182c56d1c3 100644 --- a/thirdparty/thekla_atlas/nvmath/ftoi.h +++ b/thirdparty/thekla_atlas/nvmath/ftoi.h @@ -53,7 +53,10 @@ namespace nv return (val<0) ? ftoi_ceil_xs(val) : ftoi_floor_xs(val); } -#if NV_CPU_X86 || NV_CPU_X86_64 +// -- GODOT start -- +//#if NV_CPU_X86 || NV_CPU_X86_64 +#if NV_USE_SSE +// -- GODOT end -- NV_FORCEINLINE int ftoi_round_sse(float f) { return _mm_cvt_ss2si(_mm_set_ss(f)); diff --git a/thirdparty/thekla_atlas/nvmath/nvmath.h b/thirdparty/thekla_atlas/nvmath/nvmath.h index 695f452c1d..f2b69426e1 100644 --- a/thirdparty/thekla_atlas/nvmath/nvmath.h +++ b/thirdparty/thekla_atlas/nvmath/nvmath.h @@ -14,10 +14,12 @@ #include <float.h> // finite, isnan #endif -#if NV_CPU_X86 || NV_CPU_X86_64 - //#include <intrin.h> - #include <xmmintrin.h> -#endif +// -- GODOT start -- +//#if NV_CPU_X86 || NV_CPU_X86_64 +// //#include <intrin.h> +// #include <xmmintrin.h> +//#endif +// -- GODOT end -- @@ -65,6 +67,13 @@ #endif +// -- GODOT start -- +#if NV_USE_SSE + //#include <intrin.h> + #include <xmmintrin.h> +#endif +// -- GODOT end -- + #ifndef PI #define PI float(3.1415926535897932384626433833) |