[Cuis-dev] [DEFECT] Move of #magnitude to the complex package causes Form>>#magnifyBy: to fail.
Gerald Klix
cuis.01 at klix.ch
Mon Mar 13 07:29:25 PDT 2023
The complex package defines it as `self abs`,
which is consistent with border case i = 0 for the magnitude
of a complex number.
Interestingly enough Point>>#magnitude is still there.
Loading the complex package is a possible fix.
Best Regards,
Gerald
On 3/13/23 2:50 PM, ken.dickey at whidbey.com wrote:
> Hmm.. I suspect Magnitude>>magnitude should answer self.
>
> Juan?
>
> $0.02,
> -KenD
>
> On 2023-03-13 06:21, Gerald Klix via Cuis-dev wrote:
>> Hi all, Hi Juan,
>>
>> That's how #magnifyBy: is defined:
>>
>> magnifyBy: scale
>> "Answer a Form created as a scaling of the receiver.
>> Scale may be a Float, and may be greater or less than 1.0."
>>
>> ^ self magnify: self boundingBox by: scale
>> smoothing: (scale magnitude < 1 ifTrue: [2] ifFalse: [1])
>>
>>
>> It comments states that it accepts a float, which does not work,
>> because `scale magnitude` causes a DNU.
>>
>> Should I use the complex package?
>>
>>
>> Best Regards,
>>
>> Gerald
More information about the Cuis-dev
mailing list