vector.normalized() doesn't do what you expect
Bug #412731 reported by
Rob Speer
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Divisi |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Intuitively, when you normalize a vector, you should get back another vector of unit length, or something that acts like it.
Instead, Divisi tries to normalize it the way it would normalize something bigger -- chopping it up into slices, finding the norm of each slice, and then giving you a view that divides those slices by their norm.
Except these slices are *scalars*, so if this worked it would give you something like [1.0, 1.0, 1.0, ...]. And it gets an IndexError anyway.
I think that .normalized() on a vector should normalize by the magnitude of that single vector (whether it uses a view to do so or not).
Changed in divisi: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
To post a comment you must log in.
A workaround for the moment is `.normalized_copy`.
-Ken
On Wed, Aug 12, 2009 at 5:30 PM, Rob Speer<email address hidden> wrote: /bugs.launchpad .net/bugs/ 412731 _______ _______ _______ _______ _______ _____ /launchpad. net/~commonsens e /launchpad. net/~commonsens e /help.launchpad .net/ListHelp
> Public bug reported:
>
> Intuitively, when you normalize a vector, you should get back another
> vector of unit length, or something that acts like it.
>
> Instead, Divisi tries to normalize it the way it would normalize
> something bigger -- chopping it up into slices, finding the norm of each
> slice, and then giving you a view that divides those slices by their
> norm.
>
> Except these slices are *scalars*, so if this worked it would give you
> something like [1.0, 1.0, 1.0, ...]. And it gets an IndexError anyway.
>
> I think that .normalized() on a vector should normalize by the magnitude
> of that single vector (whether it uses a view to do so or not).
>
> ** Affects: divisi
> Importance: Medium
> Status: Confirmed
>
> ** Changed in: divisi
> Status: New => Confirmed
>
> ** Changed in: divisi
> Importance: Undecided => Medium
>
> --
> vector.normalized() doesn't do what you expect
> https:/
> You received this bug notification because you are a member of
> Commonsense Computing, which is the registrant for Divisi.
>
> Status in Divisi: Confirmed
>
> Bug description:
> Intuitively, when you normalize a vector, you should get back another vector of unit length, or something that acts like it.
>
> Instead, Divisi tries to normalize it the way it would normalize something bigger -- chopping it up into slices, finding the norm of each slice, and then giving you a view that divides those slices by their norm.
>
> Except these slices are *scalars*, so if this worked it would give you something like [1.0, 1.0, 1.0, ...]. And it gets an IndexError anyway.
>
> I think that .normalized() on a vector should normalize by the magnitude of that single vector (whether it uses a view to do so or not).
>
> _______
> Mailing list: https:/
> Post to : <email address hidden>
> Unsubscribe : https:/
> More help : https:/
>