Performs a projection of param such that the new norm will be less than or equal to maxval.
See Implementation
Performs a projection of param such that the new norm will be less than or equal to maxval.