Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0007101 [Squeak] Janitorial minor always 06-24-08 20:53 04-18-10 22:04
Reporter nicolas cellier View Status public  
Assigned To nicolas cellier
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0007101: asSmallPositiveDegrees uselessly complex and can loop infinitely
Description Try for example:
-1.0e20 asSmallPositiveDegrees.

Additional Information Current code is:
    | result |
    result _ self.
    [result < 0] whileTrue: [result _ result + 360].
    ^ result \\ 360

when it could be:
    ^ self \\ 360

Anyway, this message does not seem often sent...
Attached Files

- Relationships

- Notes
(0012313 - 724 - 758 - 758 - 758 - 758 - 758)
ScottWallace
06-29-08 00:48

Yes, obviously this is a careless (and even comical) oversight, which never was exposed because this is a method which in practice is never called and which occupies a disused branch of effort dating from ancient SqC days, which really has no role in any squeak.org image. (Labelling this item 'Janitorial' is very appropriate...)

Note that the nearby, and much earlier, #asSmallAngleDegrees, which -- unlike #asSmallPositiveDegrees -- actually is still actively used in the system, is by the same author, and illustrates that he actually sometimes knows better ;-)

In any case, as you say, the method should surely be changed to have its entire implementation be "^ self \\ 360" in any image in which it is retained.
 
(0012317 - 132 - 138 - 138 - 138 - 138 - 138)
nicolas cellier
07-02-08 22:55

'Janitorial' labelling is a eye-hand-mouse loop failure, 'Kernel' was wanted.
Should think of a revision of my neuro control system
 
(0013353 - 59 - 59 - 209 - 209 - 209 - 209)
nicolas cellier
10-05-09 19:37

Fixed in http://source.squeak.org/trunk/Kernel-nice.259.mcz [^]
 

- Issue History
Date Modified Username Field Change
06-24-08 20:53 nicolas cellier New Issue
06-29-08 00:48 ScottWallace Note Added: 0012313
07-02-08 22:55 nicolas cellier Note Added: 0012317
10-05-09 19:37 nicolas cellier Issue Monitored: nicolas cellier
10-05-09 19:37 nicolas cellier Status new => resolved
10-05-09 19:37 nicolas cellier Fixed in Version  => trunk
10-05-09 19:37 nicolas cellier Resolution open => fixed
10-05-09 19:37 nicolas cellier Assigned To  => nicolas cellier
10-05-09 19:37 nicolas cellier Note Added: 0013353
04-18-10 22:04 andreas Status resolved => closed


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
48 total queries executed.
36 unique queries executed.
Powered by Mantis Bugtracker