rust-num / num-complex

Complex numbers for Rust
Apache License 2.0
232 stars 50 forks source link

Add cis function #101

Closed rayhem closed 2 years ago

rayhem commented 2 years ago

Adds a cis function as a convenient way to construct a complex number with a specific phase/angle. Shorthand for (Complex::i() * angle).exp().

cuviper commented 2 years ago

Looks good!

bors r+

bors[bot] commented 2 years ago

Build succeeded:

rayhem commented 2 years ago

Thank you for the review @cuviper and for making it easy to make my first Rust PR!

cuviper commented 2 years ago

@rayhem I just noticed that GitHub identified your commits under a different name, @cglosser, which is what I collected into the release notes. Are these just alternate accounts of yours? Do you care which is in the release notes?

rayhem commented 2 years ago

@cuviper Yeah, those are both me. I'm not exactly sure how that happened; I think it's something to do with the gh utility that's replaced direct ssh access. Anyway, @rayhem is slightly preferable, but it doesn't matter much either way (especially if it's a hassle to change).

cuviper commented 2 years ago

I can't change the file in the published artifacts, but I've updated the release notes anyway.

I believe GitHub simply looks at the commit's author email to make that association. It will also indicate a separate committer if that's different, as seen in git log --pretty=fuller. I don't know how it decides if there are multiple accounts with the same email, but I'm pretty sure that's disallowed for GPG and SSH keys, at least.