• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ ReadDouble函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中ReadDouble函数的典型用法代码示例。如果您正苦于以下问题:C++ ReadDouble函数的具体用法?C++ ReadDouble怎么用?C++ ReadDouble使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ReadDouble函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ReadObjectHeader

bool  DPO_BasicSequenceFit::ReadFromFile()
{
    ReadObjectHeader();

    // base class
    ReadFuncObjRef(simResultsObjRef);
    fitCalcType = FitCalcType(ReadInt());
    fitSigma = ReadDouble();
    fitIsNormed = ReadBool();

    if (currentObjReadMajorVersion > 0)
    {
        minCoverage = ReadDouble();
        coveragePenalty = ReadDouble();
    }

    if (currentObjReadMajorVersion > 1)
    {
        removeFieldDuplicates = ReadBool();
        removeSimDuplicates = ReadBool();
        duplicateEps = ReadDouble();
    }

    // derived current
    ReadFuncObjRef(xyInputObjRef);
    ReadTimeLimits(timeLimits);

    ReadInterpPoints(interpPoints);

    CheckForInputFailure("Reading DPO_BasicSequenceFit");
    return true;
}
开发者ID:jjayne,项目名称:nSIGHTS,代码行数:32,代码来源:DPO_BasicSequenceFit.cpp


示例2: ReadContourSpec

void ReadContourSpec(PSC_ContourSpec& contourSpec)
{
    int scalarReadVer = ReadInt();

    ReadFuncObjRef(contourSpec.dataObjRef);
    ReadFuncObjRef(contourSpec.specMasterObjRef);

    contourSpec.specIsMaster = ReadBool();
    contourSpec.calcIncVal = ReadBool();
    contourSpec.doLogInc = ReadBool();
    contourSpec.startVal = ReadDouble();
    contourSpec.endVal = ReadDouble();
    contourSpec.incVal = ReadDouble();
    contourSpec.nIncs = ReadInt();

    contourSpec.contourLineSpec.linePen = ReadInt();
    contourSpec.contourLineSpec.lineThickness= ReadInt();
    contourSpec.contourLineSpec.lineType = PlotLineType(ReadInt());
    if (scalarReadVer > 1)
        contourSpec.contourLineSpec.mitreLines = ReadBool();

    if (scalarReadVer > 0)
        contourSpec.overrideMasterLineSpec = ReadBool();

    ReadLegendOverride(contourSpec.legendGC);
}
开发者ID:jjayne,项目名称:nSIGHTS,代码行数:26,代码来源:genPPOConfigFile.cpp


示例3: ReadObjectHeader

bool  PPO_SeriesLegend::ReadFromFile()
{
    ReadObjectHeader();
    PPO_AnnoBase::ReadFromFile();
    ReadFuncObjRef(penSetObjRef);

    int nRead = 6; // old max
    if (currentObjReadMajorVersion > 0)
        nRead = ReadInt();

    for ( int i = 0; i < nRead; i++)
    {
        ReadFuncObjRef(legendData[i].seriesObjRef);
        legendData[i].doSeries   = ReadBool();
    }

    ulLocation.pX = ReadDouble();
    ulLocation.pY = ReadDouble();

    seriesSize = ReadDouble();
    seriesNpts = ReadInt();

    ReadText(legendTitle, PSC_AnnoSpec::legendTitleLen);

    frameLegend       = ReadBool();
    frameThick        = ReadInt();
    opaqueBackground  = ReadBool();
    legendPen         = ReadInt();

    ReadFont(legendFont);

    CheckForInputFailure("Reading PPO_SeriesLegend");
    return true;
}
开发者ID:jjayne,项目名称:nSIGHTS,代码行数:34,代码来源:PPO_SeriesLegend.cpp


示例4: ReadObjectHeader

bool  DPO_CurveInterp::ReadFromFile()
{
    ReadObjectHeader();

    ReadFuncObjRef(curveObjRef);
    ReadFuncObjRef(xyInputObjRef);

    if ( currentObjReadMajorVersion == 0)
    {
        bool isXYInput = ReadBool();
        bool isLinear  = ReadBool();
        if (isXYInput)
        {
            interpData.interpPointsOp = DSC_InterpPoints::ipoAtInput;
        }
        else if (isLinear)
        {
            interpData.interpPointsOp = DSC_InterpPoints::ipoLinear;
        }
        else
        {
            interpData.interpPointsOp = DSC_InterpPoints::ipoLogRelative;
        }
        interpData.useDataLimits  = ReadBool();
        interpData.minUserLimit = ReadDouble();
        interpData.maxUserLimit = ReadDouble();
        interpData.numInterpPoints = ReadInt();
    }
    else
        ReadInterpPoints(interpData);

    CheckForInputFailure("Reading DPO_CurveInterp");
    return true;
}
开发者ID:jjayne,项目名称:nSIGHTS,代码行数:34,代码来源:DPO_CurveInterp.cpp


示例5: ReadVector

   /// reads vector
   Vector3d ReadVector()
   {
      double x = ReadDouble();
      double y = ReadDouble();
      double z = ReadDouble();

      return Vector3d(x,y,z);
   }
开发者ID:zengnotes,项目名称:MultiplayerOnlineGame,代码行数:9,代码来源:ByteStream.hpp


示例6: ReadThreshold

 void ReadThreshold(DSC_Threshold& threshold)
 {
     int readVer = ReadInt();
     threshold.minThreshold = DSC_Threshold::ThresholdOp(ReadInt());
     threshold.maxThreshold = DSC_Threshold::ThresholdOp(ReadInt());
     threshold.minVal       = ReadDouble();
     threshold.maxVal       = ReadDouble();
 }
开发者ID:jjayne,项目名称:nSIGHTS,代码行数:8,代码来源:AppConfigFile.cpp


示例7: ReadDouble

Pointf Painter::ReadPoint(CParser& p, Pointf current, bool rel)
{
	Pointf t;
	t.x = ReadDouble(p);
	t.y = ReadDouble(p);
	if(rel)
		t += current;
	return t;
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:9,代码来源:PainterPath.cpp


示例8: LoadTIMER

void LoadTIMER(SAVESTATE_t* save, timerc* time) {
	CHUNK_t* chunk = FindChunk(save,TIMER_tag);
	chunk->pnt = 0;

	time->tstates	= ReadLong(chunk);
	time->freq		= (uint32_t) ReadLong(chunk);
	time->elapsed	= ReadDouble(chunk);
	time->lasttime	= ReadDouble(chunk);	// this isn't used.
}
开发者ID:elfprince13,项目名称:cli-wabbitemu,代码行数:9,代码来源:savestate.cpp


示例9: ReadPointArray

    void ReadPointArray(SC_PointArray& pointArray)
    {
        int nPt = ReadInt();
        pointArray.Alloc(nPt);
        Point2D tmp;
        for (int i = 0; i < nPt; i++)
            {
                tmp.pX = ReadDouble();
                tmp.pY = ReadDouble();
                pointArray += tmp;

                //      pointArray += Point2D(ReadDouble(), ReadDouble());  // MS bug -- reads Y first
            }
    }
开发者ID:jjayne,项目名称:nSIGHTS,代码行数:14,代码来源:AppConfigFile.cpp


示例10: _pm_checkPacketId

size_t PlayerPositionAndLook::deserialize(const Buffer& _src, size_t _offset)
{
	_offset = _pm_checkPacketId(_src, _offset);

	_offset = ReadDouble(_src, _offset, _pf_x);
	_offset = ReadDouble(_src, _offset, _pf_stance);
	_offset = ReadDouble(_src, _offset, _pf_y);
	_offset = ReadDouble(_src, _offset, _pf_z);
	_offset = ReadFloat(_src, _offset, _pf_yaw);
	_offset = ReadFloat(_src, _offset, _pf_pitch);
	_offset = ReadBool(_src, _offset, _pf_onGround);
	_pf_initialized = true;
	return _offset;
}
开发者ID:TRocket,项目名称:gnuCraft,代码行数:14,代码来源:msg_0x0d_playerpositionandlook_tw.cpp


示例11: ReadObjectHeader

bool  DPO_ExtractSASteps::ReadFromFile()
{
    ReadObjectHeader();
    ReadFuncObjRef(inputTableObjRef);

    extractByIndexes = ReadBool();
    minIndex = ReadInt();
    maxIndex = ReadInt();
    indexIncrement = ReadInt();
    minValue = ReadDouble();
    maxValue = ReadDouble();

    CheckForInputFailure("Reading DPO_ExtractSASteps");
    return true;
}
开发者ID:jjayne,项目名称:nSIGHTS,代码行数:15,代码来源:DPO_ExtractSASteps.cpp


示例12: main

int main (void)
{
	printf ("Hello World\n");
	OpenIniFile ("Test.Ini");
#ifdef INIFILE_TEST_READ_AND_WRITE
	WriteString  ("Test", "Name", "Value");
	WriteString  ("Test", "Name", "OverWrittenValue");
	WriteString  ("Test", "Port", "COM1");
	WriteString  ("Test", "User", "James Brown jr.");
	WriteString  ("Configuration", "eDriver", "MBM2.VXD");
	WriteString  ("Configuration", "Wrap", "LPT.VXD");
	WriteInt 	 ("IO-Port", "Com", 2);
	WriteBool 	 ("IO-Port", "IsValid", 0);
	WriteDouble  ("TheMoney", "TheMoney", 67892.00241);
	WriteInt     ("Test"    , "ToDelete", 1234);
	WriteIniFile ("Test.Ini");
	printf ("Key ToDelete created. Check ini file. Any key to continue");
	while (!kbhit());
	OpenIniFile  ("Test.Ini");
	DeleteKey    ("Test"	  , "ToDelete");
	WriteIniFile ("Test.Ini");
#endif
	printf ("[Test] Name = %s\n", ReadString ("Test", "Name", "NotFound"));
	printf ("[Test] Port = %s\n", ReadString ("Test", "Port", "NotFound"));
	printf ("[Test] User = %s\n", ReadString ("Test", "User", "NotFound"));
	printf ("[Configuration] eDriver = %s\n", ReadString ("Configuration", "eDriver", "NotFound"));
	printf ("[Configuration] Wrap = %s\n", ReadString ("Configuration", "Wrap", "NotFound"));
	printf ("[IO-Port] Com = %d\n", ReadInt ("IO-Port", "Com", 0));
	printf ("[IO-Port] IsValid = %d\n", ReadBool ("IO-Port", "IsValid", 0));
	printf ("[TheMoney] TheMoney = %1.10lf\n", ReadDouble ("TheMoney", "TheMoney", 111));
	CloseIniFile ();
	return 0;
}
开发者ID:dulton,项目名称:FNF_Project1,代码行数:33,代码来源:inifile.c


示例13: main

int main(void)
{
    // initialize to zeros
    struct Product prod = { 0 };

    printf("Enter item number: ");
    ReadInt(&prod.id, &OnInvalidInputHandler);

    printf("Enter unit price: ");
    ReadDouble(&prod.price, &OnInvalidInputHandler);

    printf("Enter purchase date (mm/dd/yyyy): ");
    ReadDate(&prod.purchaseDate, &OnInvalidInputHandler);

    printf("%s\t%s\t%s\n", "Item", "Unit Price", "Purchase Date");
    printf("%d\t$%.2Lf\t\t%02d/%02d/%d\n",
        prod.id,
        prod.price,
        prod.purchaseDate.tm_mon,
        prod.purchaseDate.tm_mday,
        prod.purchaseDate.tm_year);
    getchar();

    return EXIT_SUCCESS;
}
开发者ID:CptDemocracy,项目名称:The-C-Blues,代码行数:25,代码来源:Source.c


示例14: ReadObjectHeader

bool  DPO_PATTRN::ReadFromFile()
{
    ReadObjectHeader();
    ReadFuncObjRef(indepVarObjRef);
    ReadFuncObjRef(depVarObjRef);
    ReadText(title, titleLen);

    ReadText(obsStr, inpStrLen);
    ReadText(mcRepStr, inpStrLen);
    nreplicates = ReadInt();
    randSeed = ReadInt();
    nxintInp = ReadInt();
    nyintInp = ReadInt();
    nrandomPatterns = ReadInt();
    logarithms = ReadBool();
    alphaCutoff = ReadDouble();
    mtest1      = ReadInt();
    ReadRealFormat(coeffFormat);

    verbose = ReadBool();
    verboseMC = ReadBool();
    verboseCV = ReadBool();
    coefficients = ReadBool();
    rankCoefficients = ReadBool();

    for (int i = ptCC; i < ptLastTest; i++)
        tests[i] = ReadBool();


    CheckForInputFailure("Reading DPO_PATTRN");
    return true;
}
开发者ID:jjayne,项目名称:nSIGHTS,代码行数:32,代码来源:DPO_PATTRN.cpp


示例15: ReadFont

    void ReadFont(PSC_Font& font)
    {
        int readVer = ReadInt();

        font.fontFamily      = PSC_Font::FontFamily(ReadInt());
        font.slantRegular    = ReadBool();
        font.weightMedium    = ReadBool();
        font.fontSize        = double(ReadInt());

        if (readVer > 0)
            {
                if (readVer < 3)
                    {
                        int strokeFontWeight  = ReadInt();
                        font.weightMedium = (strokeFontWeight < 2);
                    }

                if (readVer > 1)
                    font.fontRotation  = PSC_Font::FontRotation(ReadInt());

                if (readVer > 2)
                    font.fontThickness = ReadDouble();

            }

    }
开发者ID:jjayne,项目名称:nSIGHTS,代码行数:26,代码来源:AppConfigFile.cpp


示例16: ReadObjectHeader

bool  DPO_XYRemoveDuplicate::ReadFromFile()
{
    ReadObjectHeader();
    ReadFuncObjRef(xyInputObjRef);
    ReadText(outputDesc, DFO_XYBase::outputDescLen);

    removeDuplicateXValues = ReadBool();
    yValueToKeepOp =  DFO_XYRemoveDuplicate::RemoveDuplicateOp(ReadInt());
    duplicateXLimit = ReadDouble();
    removeOutOfSeq = ReadBool();
    removeDuplicateYValues = ReadBool();
    duplicateYLimit = ReadDouble();

    CheckForInputFailure("Reading DPO_XYRemoveDuplicate");
    return true;
}
开发者ID:jjayne,项目名称:nSIGHTS,代码行数:16,代码来源:DPO_XYRemoveDuplicate.cpp


示例17: ReadBool

bool Loader::ReadBool(bool *k)
{
	double d = 0;
	char token[LOADER_INPUT_LENGTH];

	if (ReadDouble(d))
	{	
		if (IsEqual(d, 1.0))
			*k = true;
		else if (IsZero(d))
			*k = false;
		else
			return false;
		return true;
	}
	else if (ReadToken(token))
	{
		if (token[0] == 't')
			*k = true;
		else if (token[0] == 'f')
			*k = false;
		else 
			return false;
		return true;
	}
	else
		return false;
}
开发者ID:HHMedina,项目名称:DePaul-UNI-Projects,代码行数:28,代码来源:Loader.cpp


示例18: LoadSTDINT

void LoadSTDINT(SAVESTATE_t* save, STDINT_t* stdint) {
	int i;
	CHUNK_t* chunk		= FindChunk(save,STDINT_tag);
	chunk->pnt = 0;

	stdint->intactive	= ReadChar(chunk);
	stdint->lastchk1	= ReadDouble(chunk);
	stdint->timermax1	= ReadDouble(chunk);
	stdint->lastchk2	= ReadDouble(chunk);
	stdint->timermax2	= ReadDouble(chunk);
	for(i = 0; i < 4; i++) {
		stdint->freq[i]	= ReadDouble(chunk);
	}
	stdint->mem			= ReadInt(chunk);
	stdint->xy			= ReadInt(chunk);
}
开发者ID:elfprince13,项目名称:cli-wabbitemu,代码行数:16,代码来源:savestate.cpp


示例19: _pm_checkPacketId

size_t Explosion::deserialize(const Buffer& _src, size_t _offset)
{
	_offset = _pm_checkPacketId(_src, _offset);

	_offset = ReadDouble(_src, _offset, _pf_x);
	_offset = ReadDouble(_src, _offset, _pf_y);
	_offset = ReadDouble(_src, _offset, _pf_z);
	_offset = ReadFloat(_src, _offset, _pf_radius);
	_offset = ReadInt32(_src, _offset, _pf_recordCount);
	_offset = ReadByteArray(_src, _offset, _pf_recordCount * 3, _pf_records);
	_offset = ReadFloat(_src, _offset, _pf_playerMotionX);
	_offset = ReadFloat(_src, _offset, _pf_playerMotionY);
	_offset = ReadFloat(_src, _offset, _pf_playerMotionZ);
	_pf_initialized = true;
	return _offset;
}
开发者ID:TRocket,项目名称:gnuCraft,代码行数:16,代码来源:msg_0x3c_explosion_stc.cpp


示例20: ReadHistogram

void ReadHistogram(PSC_Histogram& histogram)
{
    ReadEdgeSpec(histogram);
    int ver = ReadInt();
    histogram.orientationX = ReadBool();
    histogram.baselineIsValue = ReadBool();
    histogram.baselineValue = ReadDouble();
    histogram.positionIsValue = ReadBool();
    histogram.widthSpec = PSC_Histogram::WidthSpec(ReadInt());
    histogram.widthLineThk = ReadInt();
    histogram.widthSpecValue = ReadDouble();
    histogram.widthSpecPixel = ReadInt();
    histogram.widthSpecPct = ReadDouble();
    if (ver > 0)
        histogram.indexOffset = ReadDouble();
}
开发者ID:jjayne,项目名称:nSIGHTS,代码行数:16,代码来源:genPPOConfigFile.cpp



注:本文中的ReadDouble函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ReadError函数代码示例发布时间:2022-05-30
下一篇:
C++ ReadDirectoryChangesW函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap