Skip to content

Support operations over arrays #1

@waldyrious

Description

@waldyrious

It would be nice to be able to do:

x = Math.Complex(1,2);
// Complex {re: 1, im: 2, …}
y = Math.Complex(2,3);
// Complex {re: 2, im: 3, …}
a = [x, y];
// [Complex {re: 1, im: 2, …}, Complex {re: 2, im: 3, …}]
Math.Complex.mul(a,2);
// [Complex {re: 2, im: 4, …}, Complex {re: 4, im: 6, …}]
Math.Complex.con(a);
// [Complex {re: 1, im: -2, …}, Complex {re: 2, im: -3, …}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions