updated ray.h with scale_and_clampe