Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constant: tau #581

Closed
Keavon opened this issue Sep 26, 2024 · 3 comments
Closed

Constant: tau #581

Keavon opened this issue Sep 26, 2024 · 3 comments

Comments

@Keavon
Copy link

Keavon commented Sep 26, 2024

Having the built-in constant tau (equal to 2 * pi) would be very handy for describing the radians in a full circle instead of needing to use 2 * pi in many equations like a circle's circumference.

@sharkdp
Copy link
Owner

sharkdp commented Sep 26, 2024

We have tau defined here: https://github.com/sharkdp/numbat/blob/master/numbat%2Fmodules%2Fmath%2Fconstants.nbt#L10-L12

It's currently only available as a Unicode identifier τ, but feel free to add a tau alias.

In the CLI version, you can also type \tau<tab> to have the Unicode character τ inserted.

@Keavon
Copy link
Author

Keavon commented Sep 26, 2024

Glad to see it's included! I wouldn't have thought to type the Greek letter when pi works. Is there a reason only pi is aliased as such by default? I suppose it doesn't matter that much to me, since this would all be customizable in a custom usage, but I suppose I'm just curious now :)

@sharkdp
Copy link
Owner

sharkdp commented Sep 26, 2024

Is there a reason only pi is aliased as such by default?

I probably just wanted to keep the name "tau" free, since it's often used for time-related quantities in physics (e.g. relaxation times).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants