Moved function for calculating of reflected ray to utils.h