Hi,
How do you get point numbers (1.5 , 2.7526) on a counter?
Printable View
Hi,
How do you get point numbers (1.5 , 2.7526) on a counter?
Set counter to 1.5
Haha, seriously, how couldn't you find that out on your own? :P
It's SO obvious. X)
No, I want to do a Physics sum and it keeps rounding the numbers up (or down). I really need to know and don't be so cheeky :)
Ah. Are you using the / operator?
You have to add .0 to both the divisor then, for example:
10/3 = 3
10/3.0 = 3.333...
OK, I admit, I am trying to make a Physics calculator so what you have said is very good, but how do I use this with edit boxes because what is happening is that it gets the values of the boxes and does the some. (yes, its the / and *)
EDIT - When is put something like 0.5 in the first Edit box, 0.5 in the second Edit box (the answer should be 0.25) it comes out as 0
Edit boxes Get Numeric Value expression will remove decimals. Use val(EditText$("Edit Box")) instead to retrieve decimals.
Sorry for all the questions so how would you use this to calculate the following:
State:
Edit box one = 0.5
Edit box two = 0.5
Answer = Edit box one * Edit box two
Answer 2 = Edit box one / Edit box two
Answer 3 Edit box one + Edit box two
Answer 4 = Edit box one - Edit box two
Answer = val(EditText$("Edit Box")) * val(EditText$("Edit Box 2"))
Answer 2 = val(EditText$("Edit Box")) / (val(EditText$("Edit Box 2"))*1.0)
etc.. I think *1.0 is only needed for division.
I am doing this
Val(Edittext$( "Force" ))/Val(Edittext$( "Acceleration" ))*1.0
And it comes out as 0 when the force value is 10 and the acc = 100
you need to put the *1.0 in parentheses with one of the Val() expressions (actually, you really only need to use the parenthesis with the second Val() but i find expressions easier to read when i don't even have to think about 'implied' order of operations)Quote:
Originally Posted by Robin_Manager
right now, MMF is doing the division before the multiplication (i think it always does division before multiplication), so while you still get a float in the end, you really need that float BEFORE you divide
Thanks for that help,
Here is another problem ( I am really sorry about asking so many questions)
Val(Edittext$( "Force" ))*1.0/Val(Edittext$( "Mass" ))
Force = 0.25
Mass = 0.25
Answer = 1
Actual answer 0.625
Whats going on?
0.25 / 0.25 is 1, not 0.625...
Oh dear god, it was right :D
0.25 / 0.25 is 1
0.25 * 0.25 is 0.0625