Ported rect.d and position2d.d (deprecated)