Resolve a float point precision issue.
This commit is contained in:
parent
c44ae3ca4b
commit
616ea548e8
|
|
@ -361,7 +361,7 @@ typedef NS_ENUM(NSUInteger, FSCalendarOrientation) {
|
|||
_collectionView.frame = _daysContainer.bounds;
|
||||
|
||||
}
|
||||
|
||||
_collectionView.fs_height = FSCalendarHalfFloor(_collectionView.fs_height);
|
||||
_topBorder.frame = CGRectMake(0, -1, self.fs_width, 1);
|
||||
_bottomBorder.frame = CGRectMake(0, self.fs_height, self.fs_width, 1);
|
||||
_scopeHandle.fs_bottom = _bottomBorder.fs_top;
|
||||
|
|
|
|||
|
|
@ -68,6 +68,10 @@ CG_EXTERN CGSize const CGSizeAutomatic;
|
|||
#define FSCalendarMod(c1,c2) fmodf(c1,c2)
|
||||
#endif
|
||||
|
||||
#define FSCalendarHalfRound(c) (FSCalendarRound(c*2)*0.5)
|
||||
#define FSCalendarHalfFloor(c) (FSCalendarFloor(c*2)*0.5)
|
||||
#define FSCalendarHalfCeil(c) (FSCalendarCeil(c*2)*0.5)
|
||||
|
||||
#define FSCalendarUseWeakSelf __weak __typeof__(self) FSCalendarWeakSelf = self;
|
||||
#define FSCalendarUseStrongSelf __strong __typeof__(self) self = FSCalendarWeakSelf;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue