Help with raycasting with an angle

So, I know the basics of raycasting and stuff. But how would I go about making a little angle ray cast? Lemme show you what I mean.

Like that.
Sorry if this is the wrong category, I just don’t know where to start.