I'm making a video game, and I want to map a joystick position to a rotation (of a sword). I have a set of keyframes for certain joystick positions, and I want to interpolate between the three nearest ones to create a continuous function from joystick position to sword rotation.