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

小优化 #88

Closed
wutuanxiaoyu opened this issue Mar 6, 2020 · 2 comments
Closed

小优化 #88

wutuanxiaoyu opened this issue Mar 6, 2020 · 2 comments

Comments

@wutuanxiaoyu
Copy link

public int nextPos() {
return (currentPos + 1) % 2;
}

使用&操作符

(currentPos + 1) & 1;

@thelight1
Copy link
Member

可以提PR

@Yaccc Yaccc closed this as completed Mar 15, 2020
This was referenced Apr 23, 2020
@wutuanxiaoyu
Copy link
Author

可以提PR

已提PR,麻烦评审

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

3 participants