Android Question How do i write this formula in b4a?

Sub7

Active Member
Licensed User
Longtime User
result = 100 / 150(m2)


Divide the first numer for the square of the second number expressed in meters, sorry for the dumb question.


100 / 150(150^2) give me an error, ofc


Thanks
 

Roycefer

Well-Known Member
Licensed User
Longtime User
Exponentiation is performed as such:
B4X:
result = 100/Power(150,2)
Java calculations (and by extension, B4A calculations) aren't unit-aware (at least by default). You're going to have to keep track of units and conversions manually or use a unit-aware library.
 
Upvote 0
Top