我的问题是:
就像你对待个人一样 float 价值观。
float
CGPoint snap(CGPoint p) { return CGPointMake(roundf(p.x / 16) * 16, roundf(p.y / 16) * 16); }