getAngle

private fun getAngle(x1: Float, y1: Float, x2: Float, y2: Float): Double

Computes the angle (in radians) between the points defined by the given coordinates.

Internally, this method adds π to the value returned by atan2. Therefore, the angle returned by this method is in the range 0 to 2π (inclusive), provided that it is defined.

Return

Angle (in radians) between the points defined by the given coordinates.

Parameters

x1

x-coordinate of the first down motion event that started the fling.

y1

y-coordinate of the first down motion event that started the fling.

x2

x-coordinate of the move motion event that triggered the current onFling.

y2

y-coordinate of the move motion event that triggered the current onFling.