Anonymous | Login | 02-27-2021 22:25 UTC |
Main | My View | View Issues | Change Log | Docs |
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 | |||||||||
|
![]() |
|
(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 [^] |
Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
48 total queries executed. 36 unique queries executed. |