mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Change a few instances of floorf/fabsf → floor/fabs
This commit is contained in:
@@ -102,7 +102,7 @@
|
||||
|
||||
- (void)scrollWheel:(NSEvent*)anEvent
|
||||
{
|
||||
if(![NSEvent isSwipeTrackingFromScrollEventsEnabled] || [anEvent phase] == NSEventPhaseNone || fabsf([anEvent scrollingDeltaX]) <= fabsf([anEvent scrollingDeltaY]))
|
||||
if(![NSEvent isSwipeTrackingFromScrollEventsEnabled] || [anEvent phase] == NSEventPhaseNone || fabs([anEvent scrollingDeltaX]) <= fabs([anEvent scrollingDeltaY]))
|
||||
return;
|
||||
|
||||
[anEvent trackSwipeEventWithOptions:0 dampenAmountThresholdMin:(_webView.canGoForward ? -1 : 0) max:(_webView.canGoBack ? +1 : 0) usingHandler:^(CGFloat gestureAmount, NSEventPhase phase, BOOL isComplete, BOOL* stop) {
|
||||
|
||||
@@ -376,7 +376,7 @@ static void* kOakPasteboardChooserCurrentEntryBinding = &kOakPasteboardChooserCu
|
||||
}
|
||||
}
|
||||
|
||||
- (int)visibleRows { return (int)floorf(NSHeight([_tableView visibleRect]) / ([_tableView rowHeight]+[_tableView intercellSpacing].height)) - 1; }
|
||||
- (int)visibleRows { return (int)floor(NSHeight([_tableView visibleRect]) / ([_tableView rowHeight]+[_tableView intercellSpacing].height)) - 1; }
|
||||
|
||||
- (void)moveUp:(id)sender { [self moveSelectedRowByOffset:-1 extendingSelection:NO]; }
|
||||
- (void)moveDown:(id)sender { [self moveSelectedRowByOffset:+1 extendingSelection:NO]; }
|
||||
|
||||
@@ -254,7 +254,7 @@ static size_t line_count (std::string const& text)
|
||||
}
|
||||
}
|
||||
|
||||
- (int)visibleRows { return (int)floorf(NSHeight([tableView visibleRect]) / ([tableView rowHeight]+[tableView intercellSpacing].height)) - 1; }
|
||||
- (int)visibleRows { return (int)floor(NSHeight([tableView visibleRect]) / ([tableView rowHeight]+[tableView intercellSpacing].height)) - 1; }
|
||||
|
||||
- (void)moveUp:(id)sender { [self moveSelectedRowByOffset:-1]; }
|
||||
- (void)moveDown:(id)sender { [self moveSelectedRowByOffset:+1];}
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
|
||||
- (NSUInteger)characterIndexForPoint:(NSPoint)thePoint
|
||||
{
|
||||
NSUInteger index = floorf([self convertPoint:[[self window] convertScreenToBase:thePoint] fromView:nil].x / 7.0f);
|
||||
NSUInteger index = floor([self convertPoint:[[self window] convertScreenToBase:thePoint] fromView:nil].x / 7.0f);
|
||||
NSLog(@"%s %@ (%lu)", sel_getName(_cmd), NSStringFromPoint(thePoint), index);
|
||||
return index;
|
||||
}
|
||||
|
||||
@@ -1193,7 +1193,7 @@ static NSMutableSet* SymmetricDifference (NSMutableSet* aSet, NSMutableSet* anot
|
||||
|
||||
- (void)scrollWheel:(NSEvent*)anEvent
|
||||
{
|
||||
if(![NSEvent isSwipeTrackingFromScrollEventsEnabled] || [anEvent phase] == NSEventPhaseNone || fabsf([anEvent scrollingDeltaX]) <= fabsf([anEvent scrollingDeltaY]))
|
||||
if(![NSEvent isSwipeTrackingFromScrollEventsEnabled] || [anEvent phase] == NSEventPhaseNone || fabs([anEvent scrollingDeltaX]) <= fabs([anEvent scrollingDeltaY]))
|
||||
return;
|
||||
|
||||
[anEvent trackSwipeEventWithOptions:0 dampenAmountThresholdMin:(self.canGoForward ? -1 : 0) max:(self.canGoBack ? +1 : 0) usingHandler:^(CGFloat gestureAmount, NSEventPhase phase, BOOL isComplete, BOOL* stop) {
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (int)visibleRows { return (int)floorf(NSHeight([filterView visibleRect]) / ([filterView rowHeight]+[filterView intercellSpacing].height)) - 1; }
|
||||
- (int)visibleRows { return (int)floor(NSHeight([filterView visibleRect]) / ([filterView rowHeight]+[filterView intercellSpacing].height)) - 1; }
|
||||
|
||||
- (void)moveUp:(id)sender { [self moveSelectedRowByOffset:-1 extendingSelection:NO]; }
|
||||
- (void)moveDown:(id)sender { [self moveSelectedRowByOffset:+1 extendingSelection:NO]; }
|
||||
|
||||
@@ -43,7 +43,7 @@ APPKIT_EXTERN NSString *const NSAccessibilityAnnouncementKey NS_AVAIL
|
||||
}
|
||||
}
|
||||
|
||||
- (int)visibleRows { return (int)floorf(NSHeight([_tableView visibleRect]) / ([_tableView rowHeight]+[_tableView intercellSpacing].height)) - 1; }
|
||||
- (int)visibleRows { return (int)floor(NSHeight([_tableView visibleRect]) / ([_tableView rowHeight]+[_tableView intercellSpacing].height)) - 1; }
|
||||
|
||||
- (void)moveUp:(id)sender { [self moveSelectedRowByOffset:-1 extendingSelection:NO sender:sender]; }
|
||||
- (void)moveDown:(id)sender { [self moveSelectedRowByOffset:+1 extendingSelection:NO sender:sender]; }
|
||||
|
||||
Reference in New Issue
Block a user