New answers tagged

0

Adding the dragged actor's parent coordinate values to the actor's values did the trick: Vector2 snapShot = new Vector2(a.getParent().getX() + a.getX(), a.getParent().getY() + a.getY()) ; other.getParent().addActor(a); a.setBounds(snapShot.x, snapShot.y, a.getWidth(), a.getHeight());


2

I tried it out in the Online Encyclopedia of Integer Sequences and found this one for the top half of the diamond: i = floor((-1 + sqrt(1+4*number))/2) The bottom half just needs to be reversed, like you’ve already done when going the other way.


Top 50 recent answers are included