public final void rotateToVector(Point2D vector){
  double angle=Math.toDegrees(Math.atan2(vector.getY(),vector.getX()));
  setValue(angle);
}

public final void rotateToVector ( Point2D vector ) { double angle = Math . toDegrees ( Math . atan2 ( vector . getY ( ) , vector . getX ( ) ) ) ; setValue ( angle ) ; }
set absolute rotation of the entity view to angle between vector and positive x axis . this is useful for projectiles ( bullets , arrows , etc ) which rotate depending on their current velocity . note , this assumes that at 0 angle rotation the scene view is facing right .
