Closed flyingxu closed 7 years ago
The error is saying that you're specifying a multiplier of 0, which is what's happening here. The issue is that you're dividing two int
s, so (4 / 6) == 0
. If you change that to button.AtBottomOf(View).WithMultiplier(4/6f)
you should get the behavior you were expecting.
oh God, I must be drunk that day.
this code is working fine:
button.AtBottomOf(View).WithMultiplier(0.667f),
but if I change the float to some expression like the following, it will not work:button.AtBottomOf(View).WithMultiplier((float)(4/6)),
it crashes at runtime with exception: