本文整理汇总了C++中BigFloat::FromDouble方法的典型用法代码示例。如果您正苦于以下问题:C++ BigFloat::FromDouble方法的具体用法?C++ BigFloat::FromDouble怎么用?C++ BigFloat::FromDouble使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BigFloat
的用法示例。
在下文中一共展示了BigFloat::FromDouble方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CommandCallback
NxI32 CommandCallback(NxI32 token,NxI32 count,const char **arglist)
{
NxI32 ret = 0;
saveMenuState();
switch ( token )
{
case MC_MEMORY_REPORT:
break;
case MC_FLOATING_POINT_RESOLUTION:
if ( count == 2 )
{
MultiFloatType type = MFT_MEDIUM;
if ( stricmp(arglist[1],"SMALL") == 0 )
type = MFT_SMALL;
else if ( stricmp(arglist[1],"MEDIUM") == 0 )
type = MFT_MEDIUM;
else if ( stricmp(arglist[1],"BIGFLOAT") == 0 )
type = MFT_BIG;
else if ( stricmp(arglist[1],"FIXED32") == 0 )
type = MFT_FIXED32;
tf_setFloatingPointResolution(gTfrac,type);
gLog->Display("Setting Floating Point Resolution to: %s\r\n", arglist[1] );
}
break;
case MC_SHOW_NORMALS:
if ( count == 2 )
{
setShowNormals( getBool(arglist[1]) );
}
break;
case MC_ENVIRONMENT_TEXTURE:
if ( count == 2 )
{
const char *t = arglist[1];
if ( gFileSystem ) t = gFileSystem->FileOpenString(t,true);
gPd3d->setEnvironmentTexture(t);
}
break;
case MC_ROTATION_SPEED:
if ( count == 2 )
{
NxF32 rspeed = (NxF32)atof( arglist[1] );
setRotationSpeed(rspeed);
}
break;
case MC_OPTIMIZE_MESH:
if ( !mStartup )
{
tf_state(gTfrac,TS_OPTIMIZE_MESH);
}
break;
case MC_FILTER_FRACTAL:
if ( !mStartup )
{
tf_state(gTfrac,TS_FILTER_FRACTAL);
}
break;
case MC_DEFAULT_MANDELBROT:
if ( !mStartup )
{
BigFloat xleft;
BigFloat xright;
BigFloat ytop;
xleft.FromDouble(-2.5);
xright.FromDouble(0.75);
ytop.FromDouble(-1.5);
tf_setFractalCoordinates(gTfrac,xleft,xright,ytop);
tf_action(gTfrac,FA_MOUSE_CENTER,false,1024/2,768/2);
}
break;
case MC_CLAMP_LOW:
if ( count == 2 && gTfrac )
{
NxF32 c = (NxF32) atof( arglist[1] );
tf_state(gTfrac,TS_CLAMP_LOW,false,0,c);
}
break;
case MC_CLAMP_HIGH:
if ( count == 2 && gTfrac )
{
NxF32 c = (NxF32) atof( arglist[1] );
tf_state(gTfrac,TS_CLAMP_HIGH,false,0,c);
}
break;
case MC_CLAMP_SCALE:
if ( count == 2 && gTfrac )
{
NxF32 c = (NxF32) atof( arglist[1] );
tf_state(gTfrac,TS_CLAMP_SCALE,false,0,c);
}
break;
case MC_WIREFRAME_OVERLAY:
if ( count == 2 && gTfrac )
{
bool state = getBool(arglist[1]);
tf_state(gTfrac,TS_WIREFAME_OVERLAY,state);
}
//.........这里部分代码省略.........