Floating-point weirdness with vectors
shBLOCK opened this issue · 4 comments
Multiplying a vector with a negative number causes its 0 elements to turn to -0:
Comparing (0,0,0)==(-0,-0,-0) works fine (returns 1)
But it doesn't seem to be working well with the Set operations, it thinks (0,0,0) != (-0,-0,-0): (here the XOR operation should think they're the same and return an empty list)
This causes my spell to only work in +x,+y and +z axis.
Ah yep that's an easy fix, which I will do tomorrow.
…On Thu, May 19, 2022 at 9:47 PM shBLOCK ***@***.***> wrote:
Multiplying a vector with a negative number causes its 0 elements to turn
to -0:
[image: javaw_Y8r6sFuofI]
<https://user-images.githubusercontent.com/50770712/169437697-915eaf8e-6729-450c-901b-7eb126dddd86.png>
Comparing (0,0,0)==(-0,-0,-0) works fine (returns 1)
But it doesn't seem to be working well with the Set operations, it thinks
(0,0,0) != (-0,-0,-0): (here the XOR operation should think they're the
same and return an empty list)
[image: javaw_yzLLesTmkC]
<https://user-images.githubusercontent.com/50770712/169438559-299d6d1f-6b75-4e0b-8c14-47dea98ae031.png>
This causes my spell to only work in +x,+y and +z axis.
—
Reply to this email directly, view it on GitHub
<#81>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHD6LUSQBHOW55OWAPZHNT3VK34NVANCNFSM5WOBIYZQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>