You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.
Currently, you get the angle value from the [0, 1] float range depending on your start_angle value. This angle value represents the percentage of the circle that the slider went around (standard radian, counter-clockwise). For example, if you set the start_angle to 3.14 (Pi), your 'zero' would be on the left side. If you would like to convert these values to the human clock form ('zero' on top, clockwise), you can use the following two functions to convert to clock value and back. Both return a value from the [0, 1] range so you can multiply with your values - clock values would obviously be in the [1, 12] range.
Converter functions for start_angle="3.14" example:
// you get the angle from the slider listener
float convertAngleToClock(float angle) {
return (3f / 4f - angle) % 1;
}
// use the returned value in the `setPosition(float)` method
float convertClockToPosition(float clock) {
return 1f - ((1f / 4f + clock) % 1);
}
It's very similar for other start_value angles, you just change the 1/4 and 3/4 values to your rotation phases.
How to get the value, angle value?
The text was updated successfully, but these errors were encountered: