mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-10-05 13:51:04 +00:00
Add glm 0.9.2
This commit is contained in:
parent
21545e1a24
commit
c4b531ed5e
218 changed files with 46187 additions and 0 deletions
68
ExternalLibs/glm/gtx/fast_square_root.hpp
Normal file
68
ExternalLibs/glm/gtx/fast_square_root.hpp
Normal file
|
@ -0,0 +1,68 @@
|
|||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Created : 2006-01-04
|
||||
// Updated : 2008-10-07
|
||||
// Licence : This source is under MIT License
|
||||
// File : glm/gtx/fast_square_root.hpp
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Dependency:
|
||||
// - GLM core
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Note:
|
||||
// - Sqrt optimisation based on Newton's method,
|
||||
// www.gamedev.net/community/forums/topic.asp?topic id=139956
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef glm_gtx_fast_square_root
|
||||
#define glm_gtx_fast_square_root
|
||||
|
||||
// Dependency:
|
||||
#include "../glm.hpp"
|
||||
|
||||
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
|
||||
# pragma message("GLM: GLM_GTX_fast_square_root extension included")
|
||||
#endif
|
||||
|
||||
namespace glm{
|
||||
namespace gtx{
|
||||
namespace fast_square_root ///< GLM_GTX_fast_square_root extension: Fast but less accurate implementations of square root based functions.
|
||||
{
|
||||
/// \addtogroup gtx_fast_square_root
|
||||
/// @{
|
||||
|
||||
//! Faster than the common sqrt function but less accurate.
|
||||
//! From GLM_GTX_fast_square_root extension.
|
||||
template <typename genType>
|
||||
genType fastSqrt(genType const & x);
|
||||
|
||||
//! Faster than the common inversesqrt function but less accurate.
|
||||
//! From GLM_GTX_fast_square_root extension.
|
||||
template <typename genType>
|
||||
genType fastInverseSqrt(genType const & x);
|
||||
|
||||
//! Faster than the common length function but less accurate.
|
||||
//! From GLM_GTX_fast_square_root extension.
|
||||
template <typename genType>
|
||||
typename genType::value_type fastLength(genType const & x);
|
||||
|
||||
//! Faster than the common distance function but less accurate.
|
||||
//! From GLM_GTX_fast_square_root extension.
|
||||
template <typename genType>
|
||||
typename genType::value_type fastDistance(genType const & x, genType const & y);
|
||||
|
||||
//! Faster than the common normalize function but less accurate.
|
||||
//! From GLM_GTX_fast_square_root extension.
|
||||
template <typename genType>
|
||||
genType fastNormalize(genType const & x);
|
||||
|
||||
/// @}
|
||||
}// namespace fast_square_root
|
||||
}// namespace gtx
|
||||
}// namespace glm
|
||||
|
||||
#include "fast_square_root.inl"
|
||||
|
||||
namespace glm{using namespace gtx::fast_square_root;}
|
||||
|
||||
#endif//glm_gtx_fast_square_root
|
Loading…
Add table
Add a link
Reference in a new issue