Changeset 111
- Timestamp:
- Feb 9, 2006, 6:38:09 AM (16 years ago)
- Location:
- trunk/macosx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/StringAdditions.m
r103 r111 35 35 + (NSString *) stringForSpeedAbbrev: (float) speed 36 36 { 37 if (speed < 10 24)37 if (speed < 1000) /* 0.0 K to 999.9 K */ 38 38 return [NSString stringWithFormat: @"%.1f K", speed]; 39 else if (speed < 10 48576)39 else if (speed < 102400) /* 0.98 M to 99.99 M */ 40 40 return [NSString stringWithFormat: @"%.2f M", speed / 1024]; 41 else 41 else if (speed < 1024000) /* 100.0 M to 999.9 M */ 42 return [NSString stringWithFormat: @"%.1f M", speed / 1024]; 43 else /* Insane speeds */ 42 44 return [NSString stringWithFormat: @"%.2f G", speed / 1048576]; 43 45 }
Note: See TracChangeset
for help on using the changeset viewer.