The data acquisition means acquires the acceleration data at predetermined
time intervals. The change amount calculation means calculates a change
amount vector representing a change amount of the acceleration by using
the acceleration data having been acquired by the data acquisition means.
The accumulation vector calculation means calculates an accumulation
vector by sequentially and cumulatively adding the change amount vector
having been calculated by the change amount calculation means. The
direction determination means determines, as a waving direction
representing a moving direction of the input device, a direction of the
accumulation vector, when the accumulation vector having been calculated
by the accumulation vector calculation means satisfies a predetermined
condition.