Hi,
I'm a programmer that isn't very good at maths (I know, bad career choice). I'm desperately trying to solve the following:
I have a box and within that box is a sheet of paper. I can move this sheet of paper horizontally and vertically based on it's centre point percentage. But I am trying to make it so the sheet of paper stays within the boundaries of the box without it clipping out side...
The image attached shows what I have at the top and what result I need at the bottom if I enter "0" for the horizontal and vertical percentage.
I'm a programmer that isn't very good at maths (I know, bad career choice). I'm desperately trying to solve the following:
I have a box and within that box is a sheet of paper. I can move this sheet of paper horizontally and vertically based on it's centre point percentage. But I am trying to make it so the sheet of paper stays within the boundaries of the box without it clipping out side...
The image attached shows what I have at the top and what result I need at the bottom if I enter "0" for the horizontal and vertical percentage.