-
Notifications
You must be signed in to change notification settings - Fork 138
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
Documentation: Mathematical constants are split between the math
functions and numeric data type documentation pages
#832
Comments
Thanks for noticing this! I was tempted to suggest moving everything to the functions page because that sets the stage for a discussion about module paths and maybe towards consts in other areas as well (http::localhost or some sort of geo:: or time:: consts) but the current consts in the data model page is nicely set up and consts are easy to keep track of. So I think having them in both places makes the most sense. While writing this comment I see we have a const in the source code that is ready to go but simply doesn't have its path set up ( |
@Dhghomon Do you think both pages that I mentioned above should be left as they currently are, or that all math constants should be listed on each? On the math functions page, do you think that the constants that are currently listed among the functions should be put in a separate list for constants only? |
@matthewjnield Good question, I think I lean towards having the constants listed together with the functions as it looks nice on the ON THIS PAGE scrollable menu on the right and keeps everything together in a single alphabetical order. And having all math constants on the one page as well as inside the math functions is fine too as people could easily find them using one path vs. the other. And constants are pretty unchanging compared to functions so it wouldn't lead to the headache of multiple versions on multiple pages. |
@Dhghomon Thanks, I will prepare the changes to be made to the two pages in order to have them both include all of the match constants. I will finalize the changes on a fresh branch and open a pull request after #854 is merged to avoid having to resolve conflicts arising from the switch from Docusaurus to Astro. |
I have opened pull request #860 to make this change. |
Description
Currently, SurrealDB's various mathematical constants are partially documented in two different pages; each of which has some, but not all of the constants. The two pages are:
The documentation page for the numeric data types.
File in repository:
src/content/doc-surrealql/datamodel/numbers.mdx
Web link: https://surrealdb.com/docs/surrealdb/surrealql/datamodel/numbers
The documentation page for the
math
function module.File in repository:
src/content/doc-surrealql/functions/database/math.mdx
Web link: https://surrealdb.com/docs/surrealql/functions/database/math
The following constants are only on the documentation page for the numeric data types:
MATH::FRAC_1_PI
MATH::FRAC_1_SQRT_2
MATH::FRAC_2_PI
MATH::FRAC_2_SQRT_PI
MATH::FRAC_PI_2
MATH::FRAC_PI_3
MATH::FRAC_PI_4
MATH::FRAC_PI_6
MATH::FRAC_PI_8
MATH::LN_10
MATH::LN_2
MATH::LOG10_2
MATH::LOG10_E
MATH::LOG2_10
MATH::LOG2_E
MATH::SQRT_2
The following constants are only on the documentation page for the
math
function module:math::inf
math::neg_inf
The following constants are on both of the documentation pages:
MATH::E
MATH::PI
MATH::TAU
If all of these constants should be documented on one and only one of these two pages, I will gladly make a pull request removing all constants from one page and adding the missing constants to the other page.
Is there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: