Scale symmetry in classical and quantum mechanics