Skip to content

PMVector > < operators modify in-place #122

Closed

Description

@AtharvaKhare

They should be returning a new PMVector.
Code to replicate:

x := #(1 2.5 3 4) asPMVector.
x > 2.
x. "==> a PMVector(false true true true)"

This affects PMMatrix due to it:

x := PMMatrix rows: #(#(1 2.5 3 4) #(1 2 3 8) #(23  2 5 7) #(23 2 7 6)).
y := PMMatrix rows: #(#(1 2.5 3 4) #(1 2 3 8) #(23  2 5 7) #(23 2 7 6)).
x > y. " Error "

primarily due to it using rowsCollect, which applies block directly to rows (PMVectors).

Using columnsCollect does not modify the Matrix in-place, as columnsCollect creates a copy of column and passes it to the PMVector > operator.

Activity

  1. AtharvaKhare commented on May 26, 2019

    @AtharvaKhare
    Author

    Also, should >= and <= operators be added as-well?

  2. added a commit that references this issue on May 26, 2019
  3. added a commit that references this issue on Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions