Re: [JAVA3D] Need of Equivalent code in Java

2001-07-10 Thread Martin Desruisseaux
48 Objet : Re: Need of Equivalent code in Java > Thanks a lot Leyland. Ur code is very useful to us and it helped us to > proceed further.. Thanks again. > > Regards, > ishwari > > ----- Original Message - > From: "Leyland Needham" <[EMAIL PROTECTED]>

Re: [JAVA3D] Need of Equivalent code in Java

2001-07-09 Thread ishwari
Thanks a lot Leyland. Ur code is very useful to us and it helped us to proceed further.. Thanks again. Regards, ishwari - Original Message - From: "Leyland Needham" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 09, 2001 8:51 PM Subject: Re: [JAVA

Re: [JAVA3D] Need of Equivalent code in Java

2001-07-09 Thread Vijayan Pandalai
PROTECTED] Subject: Re: [JAVA3D] Need of Equivalent code in Java  The problem may be because its backwards. That is, it may be an issue of bigendian and little endian... I'm not sure if this will work... try reversingthe process and looking at the bits by

Re: [JAVA3D] Need of Equivalent code in Java

2001-07-09 Thread Leyland Needham
The problem may be because its backwards. That is, it may be an issue of big endian and little endian... I'm not sure if this will work... try reversing the process and looking at the bits by using the function Double.doubleToLongBits... Also as a quicky you can try reversing the byte order dont

Re: [JAVA3D] Need of Equivalent code in Java

2001-07-09 Thread Leyland Needham
I have not tried his code, but you should get a better idea looking at it like this... byte arr[8]; long bits=0; double db; for(i=0;i<8;i++) arr[i] = getbyte(); for(i=0;i<8;i++) bits = (bits << 8) | arr[i]; db = Double.longBitsToDouble(bits); basicly convert the array of bytes to a si

Re: [JAVA3D] Need of Equivalent code in Java

2001-07-09 Thread ishwari
longBitsToDouble I think.. Can u help me in correcting this problem?   Regards, ishwari   - Original Message - From: Martin Desruisseaux To: [EMAIL PROTECTED] Sent: Monday, July 09, 2001 4:07 PM Subject: Re: [JAVA3D] Need of Equivalent code in Java Hi Ishwari

Re: [JAVA3D] Need of Equivalent code in Java

2001-07-09 Thread ishwari
: [JAVA3D] Need of Equivalent code in Java Hi Ishwari   You may try that:  long bits=0; for (int i=0; i<8; i++) {     bits = (bits << 8) | getByte(); } double value = Double.longBitsToDouble(bits);         Martin.       - Message d'origine - De

Re: [JAVA3D] Need of Equivalent code in Java

2001-07-09 Thread Martin Desruisseaux
Hi Ishwari   You may try that:  long bits=0; for (int i=0; i<8; i++) {     bits = (bits << 8) | getByte(); } double value = Double.longBitsToDouble(bits);         Martin.       - Message d'origine - De : ishwari Envoyé : lundi 9 juillet 2001 04:23 Objet : Need of Equival

[JAVA3D] Need of Equivalent code in Java

2001-07-08 Thread ishwari
Hi,   I have the follg code in c++. I wish to have the equivalent code in Java.. Can anyone help me in getting it??     c++ code:   BYTE arr[8]; double *dbptr;   for(i=0;i<8;i++)     arr[i] = getbyte();   dbptr = (double *)arr;     Thanks in advance,   Regards, ishwari