Pick a random float position between two positions instead of one exactly halfway
This commit is contained in:
parent
ac868482a7
commit
be7d978a6a
1 changed files with 1 additions and 1 deletions
|
@ -118,7 +118,7 @@ module RelativePositioning
|
|||
def position_between(pos_before, pos_after)
|
||||
pos_before, pos_after = [pos_before, pos_after].sort
|
||||
|
||||
pos_before + (pos_after - pos_before) / 2
|
||||
rand(pos_before.next_float..pos_after.prev_float)
|
||||
end
|
||||
|
||||
def save_positionable_neighbours
|
||||
|
|
Loading…
Reference in a new issue