0

hi

i am using a variable as double
and passing pointer of it as parameter to an api
this is all hapening in JNI.
after i read the value i am getting an garbage value
can anybody tel me y is it hapenning,
using an float variable instead of double solves my problem.
but y is double so.

2
Contributors
3
Replies
4
Views
12 Years
Discussion Span
Last Post by jwenting
0

hmm, you seem to be missing the w and h keys on your keyboard.

As to your "problem", your native program is probably setting the value to a 32 bit floating point number.
Double in Java is a 64 bit floating point number. Either use a 64 bit floating point data type in the native code or use float in Java which is 32 bit.

0

Thanx for the reply

but why is it giving me an value like 7.16485306107743e-040 , n if i run in while loop it gives me different value each time even after the variable is intialized to ZERO i.e. 0.00

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.