Examples of asReal()


Examples of com.ngt.jopenmetaverse.shared.structureddata.OSD.asReal()

    tempSD = map.get("agent updates per second");
    Assert.assertNotNull(tempSD);
    Assert.assertTrue(tempSD instanceof OSDReal);
    Assert.assertTrue(tempSD.getType() == OSDType.Real);
    tempReal = (OSDReal)tempSD;
    Assert.assertEquals(Double.NaN, tempSD.asReal(), 0);

    tempSD = map.get("total task count");
    Assert.assertNotNull(tempSD);
    Assert.assertTrue(tempSD instanceof OSDReal);
    Assert.assertTrue(tempSD.getType() == OSDType.Real);
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.structureddata.OSD.asReal()

    @Test
    public void DeserializeReal() throws IOException, OSDException
    {
        OSD llsdReal = BinaryLLSDOSDParser.DeserializeLLSDBinary(binaryReal);
        Assert.assertEquals(OSDType.Real, llsdReal.getType());
        Assert.assertEquals(947835.234d, llsdReal.asReal(), 0);
    }

    @Test
    public void SerializeReal() throws Exception
    {
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.structureddata.OSD.asReal()

          public void DeserializeReal() throws OSDException, IOException
          {
              String realOne = "r1123412345.465711";
              OSD llsdOne = NotationalLLSDOSDParser.DeserializeLLSDNotation(realOne);
              Assert.assertEquals(OSDType.Real, llsdOne.getType());
              Assert.assertEquals(1123412345.465711d, llsdOne.asReal(), 0);

              String realTwo = "r-11234684.923411";
              OSD llsdTwo = NotationalLLSDOSDParser.DeserializeLLSDNotation(realTwo);
              Assert.assertEquals(OSDType.Real, llsdTwo.getType());
              Assert.assertEquals(-11234684.923411d, llsdTwo.asReal(), 0);
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.structureddata.OSD.asReal()

              Assert.assertEquals(1123412345.465711d, llsdOne.asReal(), 0);

              String realTwo = "r-11234684.923411";
              OSD llsdTwo = NotationalLLSDOSDParser.DeserializeLLSDNotation(realTwo);
              Assert.assertEquals(OSDType.Real, llsdTwo.getType());
              Assert.assertEquals(-11234684.923411d, llsdTwo.asReal(), 0);

              String realThree = "r1";
              OSD llsdThree = NotationalLLSDOSDParser.DeserializeLLSDNotation(realThree);
              Assert.assertEquals(OSDType.Real, llsdThree.getType());
              Assert.assertEquals(1d, llsdThree.asReal(), 0);
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.structureddata.OSD.asReal()

              Assert.assertEquals(-11234684.923411d, llsdTwo.asReal(), 0);

              String realThree = "r1";
              OSD llsdThree = NotationalLLSDOSDParser.DeserializeLLSDNotation(realThree);
              Assert.assertEquals(OSDType.Real, llsdThree.getType());
              Assert.assertEquals(1d, llsdThree.asReal(), 0);

              String realFour = "r2.0193899999999998204e-06";
              OSD llsdFour = NotationalLLSDOSDParser.DeserializeLLSDNotation(realFour);
              Assert.assertEquals(OSDType.Real, llsdFour.getType());
              Assert.assertEquals(2.0193899999999998204e-06d, llsdFour.asReal(), 0);
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.structureddata.OSD.asReal()

              Assert.assertEquals(1d, llsdThree.asReal(), 0);

              String realFour = "r2.0193899999999998204e-06";
              OSD llsdFour = NotationalLLSDOSDParser.DeserializeLLSDNotation(realFour);
              Assert.assertEquals(OSDType.Real, llsdFour.getType());
              Assert.assertEquals(2.0193899999999998204e-06d, llsdFour.asReal(), 0);

              String realFive = "r0";
              OSD llsdFive = NotationalLLSDOSDParser.DeserializeLLSDNotation(realFive);
              Assert.assertEquals(OSDType.Real, llsdFive.getType());
              Assert.assertEquals(0d, llsdFive.asReal(), 0);
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.structureddata.OSD.asReal()

              Assert.assertEquals(2.0193899999999998204e-06d, llsdFour.asReal(), 0);

              String realFive = "r0";
              OSD llsdFive = NotationalLLSDOSDParser.DeserializeLLSDNotation(realFive);
              Assert.assertEquals(OSDType.Real, llsdFive.getType());
              Assert.assertEquals(0d, llsdFive.asReal(), 0);
          }

          @Test
          public void SerializeReal() throws IOException, OSDException
          {
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.structureddata.OSD.asReal()

          {
              OSD llsdOne = OSD.FromReal(12987234.723847d);
              String sOne = NotationalLLSDOSDParser.SerializeLLSDNotation(llsdOne);
              OSD llsdOneDS = NotationalLLSDOSDParser.DeserializeLLSDNotation(sOne);
              Assert.assertEquals(OSDType.Real, llsdOneDS.getType());
              Assert.assertEquals(12987234.723847d, llsdOneDS.asReal(), 0);

              OSD llsdTwo = OSD.FromReal(-32347892.234234d);
              String sTwo = NotationalLLSDOSDParser.SerializeLLSDNotation(llsdTwo);
              OSD llsdTwoDS = NotationalLLSDOSDParser.DeserializeLLSDNotation(sTwo);
              Assert.assertEquals(OSDType.Real, llsdTwoDS.getType());
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.structureddata.OSD.asReal()

              OSD llsdTwo = OSD.FromReal(-32347892.234234d);
              String sTwo = NotationalLLSDOSDParser.SerializeLLSDNotation(llsdTwo);
              OSD llsdTwoDS = NotationalLLSDOSDParser.DeserializeLLSDNotation(sTwo);
              Assert.assertEquals(OSDType.Real, llsdTwoDS.getType());
              Assert.assertEquals(-32347892.234234d, llsdTwoDS.asReal(), 0);

              OSD llsdThree = OSD.FromReal( Double.MAX_VALUE );
              String sThree = NotationalLLSDOSDParser.SerializeLLSDNotation( llsdThree );
              OSD llsdThreeDS = NotationalLLSDOSDParser.DeserializeLLSDNotation( sThree );
              Assert.assertEquals( OSDType.Real, llsdThreeDS.getType() );
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.structureddata.OSD.asReal()

              OSD llsdThree = OSD.FromReal( Double.MAX_VALUE );
              String sThree = NotationalLLSDOSDParser.SerializeLLSDNotation( llsdThree );
              OSD llsdThreeDS = NotationalLLSDOSDParser.DeserializeLLSDNotation( sThree );
              Assert.assertEquals( OSDType.Real, llsdThreeDS.getType() );
              Assert.assertEquals( Double.MAX_VALUE, llsdThreeDS.asReal(), 0);
         
              OSD llsdFour = OSD.FromReal(Double.MIN_VALUE);
              String sFour = NotationalLLSDOSDParser.SerializeLLSDNotation(llsdFour);
              OSD llsdFourDS = NotationalLLSDOSDParser.DeserializeLLSDNotation(sFour);
              Assert.assertEquals(OSDType.Real, llsdFourDS.getType());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.