x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
constants.hpp - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\numeric\interval\constants.hpp
旋转
特效
属性
历史版本
/* Boost interval/constants.hpp template implementation file * * Copyright 2002 Herv� Br�nnimann, Guillaume Melquiond, Sylvain Pion * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or * copy at http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_NUMERIC_INTERVAL_CONSTANTS_HPP #define BOOST_NUMERIC_INTERVAL_CONSTANTS_HPP namespace boost { namespace numeric { namespace interval_lib { namespace constants { // These constants should be exactly computed. // Decimal representations wouldn't do it since the standard doesn't // specify the rounding (even nearest) that should be used. static const float pi_f_l = 13176794.0f/(1<<22); static const float pi_f_u = 13176795.0f/(1<<22); static const double pi_d_l = (3373259426.0 + 273688.0 / (1<<21)) / (1<<30); static const double pi_d_u = (3373259426.0 + 273689.0 / (1<<21)) / (1<<30); template
inline T pi_lower() { return 3; } template
inline T pi_upper() { return 4; } template
inline T pi_half_lower() { return 1; } template
inline T pi_half_upper() { return 2; } template
inline T pi_twice_lower() { return 6; } template
inline T pi_twice_upper() { return 7; } template<> inline float pi_lower
() { return pi_f_l; } template<> inline float pi_upper
() { return pi_f_u; } template<> inline float pi_half_lower
() { return pi_f_l / 2; } template<> inline float pi_half_upper
() { return pi_f_u / 2; } template<> inline float pi_twice_lower
() { return pi_f_l * 2; } template<> inline float pi_twice_upper
() { return pi_f_u * 2; } template<> inline double pi_lower
() { return pi_d_l; } template<> inline double pi_upper
() { return pi_d_u; } template<> inline double pi_half_lower
() { return pi_d_l / 2; } template<> inline double pi_half_upper
() { return pi_d_u / 2; } template<> inline double pi_twice_lower
() { return pi_d_l * 2; } template<> inline double pi_twice_upper
() { return pi_d_u * 2; } template<> inline long double pi_lower
() { return pi_d_l; } template<> inline long double pi_upper
() { return pi_d_u; } template<> inline long double pi_half_lower
() { return pi_d_l / 2; } template<> inline long double pi_half_upper
() { return pi_d_u / 2; } template<> inline long double pi_twice_lower
() { return pi_d_l * 2; } template<> inline long double pi_twice_upper
() { return pi_d_u * 2; } } // namespace constants template
inline I pi() { typedef typename I::base_type T; return I(constants::pi_lower
(), constants::pi_upper
(), true); } template
inline I pi_half() { typedef typename I::base_type T; return I(constants::pi_half_lower
(), constants::pi_half_upper
(), true); } template
inline I pi_twice() { typedef typename I::base_type T; return I(constants::pi_twice_lower
(), constants::pi_twice_upper
(), true); } } // namespace interval_lib } // namespace numeric } // namespace boost #endif // BOOST_NUMERIC_INTERVAL_CONSTANTS_HPP
constants.hpp
网页地址
文件地址
上一页
6/16
下一页
下载
( 3 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.