Skip to content

RFC: complex number negation #101

@kgryte

Description

@kgryte

Checklist

Please ensure the following tasks are completed before filing an issue.

  • Read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • If this is a general question, searched the FAQ for an existing answer.
  • If this is a feature request, the issue name begins with RFC: .

Description

Description of the issue (or feature request).

Add support for negating a complex number.

Package name: @stdlib/math/base/complex/negate
Alias: cneg

Behavior:

var v = cneg( re, im );
// returns [ -re, -im ]

The implementation is trivial; however, in ES6 envs, this is useful when combined with destructuring.

Related Issues

Does this issue (or feature request) have any related issues?

None.

Questions

Any questions for reviewers?

No.

Other

Any other information relevant to this issue (or feature request)? This may include screenshots, references, stack traces, sample output, and/or implementation notes.

No.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureIssue or pull request for adding a new feature.Good First IssueA good first issue for new contributors!Help WantedExtra attention is needed.MathIssue or pull request specific to math functionality.RFCRequest for comments. Feature requests and proposed changes.difficulty: 1Low degree of difficulty. Should be straightforward to implement and/or resolve.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions