Some utils I use from time to time for 2d stuff