add an explicit cast to float in Sprite