fix casts from floating-point to unsigned short/int for negative inputs
fix casts from floating-point to unsigned short/int for negative inputs

chr-engwer/Vc,VcDevel/Vc,VcDevel/Vc,VcDevel/Vc,VcDevel/Vc,chr-engwer/Vc,chr-engwer/Vc