Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full cycle #3

Closed
jeffleeismyhero opened this issue Oct 29, 2016 · 2 comments
Closed

Full cycle #3

jeffleeismyhero opened this issue Oct 29, 2016 · 2 comments

Comments

@jeffleeismyhero
Copy link

How can the gauge start and end at the same point (e.g., top center like a watch)?

Setting kDefaultStartAngle to M_PI_4 * 6 causes the start position to be the top center, but I cannot figure out what value to use for kDefaultEndAngle.

@lminhtm
Copy link
Owner

lminhtm commented Oct 31, 2016

Hi @jeffleeismyhero,

#define kDefaultStartAngle M_PI_2 * 3
#define kDefaultEndAngle M_PI_2 * 3 + 2 * M_PI

And change update this line:
self.divisionUnitAngle = self.numOfDivisions ? (M_PI * 2 - ABS(self.endAngle - self.startAngle))/self.numOfDivisions : 0;
To:
self.divisionUnitAngle = self.numOfDivisions ? ABS(self.endAngle - self.startAngle)/self.numOfDivisions : 0;

Thank you,

lminhtm added a commit that referenced this issue Oct 31, 2016
@jeffleeismyhero
Copy link
Author

Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants