Patent ID: 7698096

Claim:
A computer-readable storage medium storing an information processing program to be executed by a computer of an information processing apparatus which calculates an output value within a predetermined range in accordance with a tilt angle of an input device capable of being tilted at any angle, wherein a memory of the information processing apparatus for storing boundary angle data representing a boundary angle corresponding to the tilt angle, of the input device, obtained when the output value is equal to a value of a boundary of the predetermined range, and the information processing program causes the computer to execute: a tilt calculation step of calculating the tilt angle of the input device by obtaining, from the input device, input data including a value changed in accordance with the tilt angle of the input device; an accessing step of accessing boundary angle data corresponding to the tilt angle obtained when the output value is equal to a value of a boundary of the predetermined range; a first update step of updating the boundary angle data, when the tilt angle calculated in the tilt calculation step is greater than the boundary angle represented by the boundary angle data, such that the tilt angle calculated in the tilt calculation step becomes a new boundary angle; and an output calculation step of calculating the output value based on a ratio of the tilt angle calculated in the tilt calculation step to the boundary angle represented by the boundary angle data.