[Cuis-dev] [DEFECT] Move of #magnitude to the complex package causes Form>>#magnifyBy: to fail.

Juan Vuletich juan at cuis.st
Mon Mar 13 07:46:24 PDT 2023


Hi Gerald,

I guess I got carried away when moving Complex specific stuff to Complex 
package. Moved #magnitude back to the base image.

Thanks for reporting!

On 3/13/2023 11:29 AM, Gerald Klix via Cuis-dev wrote:
> 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
>


-- 
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich



More information about the Cuis-dev mailing list