Revision: 2738
          http://skim-app.svn.sourceforge.net/skim-app/?rev=2738&view=rev
Author:   hofman
Date:     2007-08-27 13:21:25 -0700 (Mon, 27 Aug 2007)

Log Message:
-----------
Use float math functions for float arguments.

Modified Paths:
--------------
    trunk/NSBezierPath_BDSKExtensions.m
    trunk/SKMainWindowController.m
    trunk/SKPDFView.m

Modified: trunk/NSBezierPath_BDSKExtensions.m
===================================================================
--- trunk/NSBezierPath_BDSKExtensions.m 2007-08-27 20:17:28 UTC (rev 2737)
+++ trunk/NSBezierPath_BDSKExtensions.m 2007-08-27 20:21:25 UTC (rev 2738)
@@ -60,7 +60,7 @@
 + (NSBezierPath*)bezierPathWithRoundRectInRect:(NSRect)rect 
radius:(float)radius
 {
     // Make sure radius doesn't exceed a maximum size to avoid artifacts:
-    radius = MIN(radius, 0.5f * MIN(NSHeight(rect), NSWidth(rect)));
+    radius = fminf(radius, 0.5f * fminf(NSHeight(rect), NSWidth(rect)));
     
     // Make sure silly values simply lead to un-rounded corners:
     if( radius <= 0 )

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2007-08-27 20:17:28 UTC (rev 2737)
+++ trunk/SKMainWindowController.m      2007-08-27 20:21:25 UTC (rev 2738)
@@ -3480,23 +3480,23 @@
     if ([tv isEqual:thumbnailTableView]) {
         NSSize thumbSize = [[[thumbnails objectAtIndex:row] image] size];
         NSSize cellSize = NSMakeSize([[[tv tableColumns] objectAtIndex:0] 
width], 
-                                     MIN(thumbSize.height, 
roundedThumbnailSize));
+                                     fminf(thumbSize.height, 
roundedThumbnailSize));
         if (thumbSize.height < 1.0)
             return 1.0;
         else if (thumbSize.width / thumbSize.height < cellSize.width / 
cellSize.height)
             return cellSize.height;
         else
-            return MAX(1.0, MIN(cellSize.width, thumbSize.width) * 
thumbSize.height / thumbSize.width);
+            return fmaxf(1.0, fminf(cellSize.width, thumbSize.width) * 
thumbSize.height / thumbSize.width);
     } else if ([tv isEqual:snapshotTableView]) {
         NSSize thumbSize = [[[[snapshotArrayController arrangedObjects] 
objectAtIndex:row] thumbnail] size];
         NSSize cellSize = NSMakeSize([[[tv tableColumns] objectAtIndex:0] 
width], 
-                                     MIN(thumbSize.height, 
roundedSnapshotThumbnailSize));
+                                     fminf(thumbSize.height, 
roundedSnapshotThumbnailSize));
         if (thumbSize.height < 1.0)
             return 1.0;
         else if (thumbSize.width / thumbSize.height < cellSize.width / 
cellSize.height)
             return cellSize.height;
         else
-            return MAX(32.0, MIN(cellSize.width, thumbSize.width) * 
thumbSize.height / thumbSize.width);
+            return fmaxf(32.0, fminf(cellSize.width, thumbSize.width) * 
thumbSize.height / thumbSize.width);
     }
     return 17.0;
 }

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2007-08-27 20:17:28 UTC (rev 2737)
+++ trunk/SKPDFView.m   2007-08-27 20:21:25 UTC (rev 2738)
@@ -1346,7 +1346,7 @@
 
 - (void)magnifyWheel:(NSEvent *)theEvent {
     float dy = [theEvent deltaY];
-    dy = dy > 0 ? MIN(0.2, dy) : MAX(-0.2, dy);
+    dy = dy > 0 ? fminf(0.2, dy) : fmaxf(-0.2, dy);
     [self setScaleFactor:[self scaleFactor] + 0.5 * dy];
 }
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to