Android Question [Solved] RotatingNeedle-Example: Question to comprehend

Pflichtfeld

Active Member
Licensed User
In this example, I find these lines:
B4X:
wc = bmpCompass.Width * 100dip / 100
hc = bmpCompass.Height * 100dip / 100
wn = bmpNeedle.Width * 100dip / 100
hn = bmpNeedle.Height * 100dip / 100

Would there be a difference to:
B4X:
wc = bmpCompass.Width * 1dip
...
or to
B4X:
wc=(DipToCurrent(bmpCompass.Width))
...
or is there a reason for this "100dip/100"
 

Pflichtfeld

Active Member
Licensed User
I think, I found out the reason myself:
DipToCurrent (Length As Int) As Int
is the definition and I suppose, that that can be unexact in some cases, because it does not return a single or float?
Is this the reason?
 
Upvote 0
Top