Browse Source

Remove core page

David Peter 1 year ago
parent
commit
b9fe6bcfe7

+ 5 - 7
book/build.py

@@ -69,12 +69,6 @@ def list_of_functions(file_name, title, modules):
         )
 
 
-list_of_functions(
-    "core",
-    "Core",
-    ["core::quantities", "core::error", "core::random"],
-)
-
 list_of_functions("lists", "Lists", ["core::lists"])
 
 list_of_functions("strings", "Strings", ["core::strings"])
@@ -88,14 +82,18 @@ list_of_functions(
     "Mathematical functions",
     [
         "core::functions",
+        "core::quantities",
         "math::functions",
         "math::trigonometry_extra",
+        "core::random",
         "math::statistics",
     ],
 )
 
 list_of_functions(
-    "other", "Other", ["physics::temperature_conversion", "chemistry::elements"]
+    "other",
+    "Other",
+    ["core::error", "physics::temperature_conversion", "chemistry::elements"],
 )
 
 subprocess.run(["mdbook", "build"], text=True)

+ 1 - 2
book/src/SUMMARY.md

@@ -45,11 +45,10 @@
 
 - [The prelude](./prelude.md)
 - [Predefined functions](./predefined-functions.md)
-  - [Core](./list-functions-core.md)]
+  - [Mathematical](./list-functions-math.md)
   - [Lists](./list-functions-lists.md)
   - [Strings](./list-functions-strings.md)
   - [Date and time](./list-functions-datetime.md)
-  - [Mathematical](./list-functions-math.md)
   - [Other](./list-functions-other.md)
 - [Predefined constants](./list-constants.md)
 - [List of units](./list-units.md)

+ 0 - 48
book/src/list-functions-core.md

@@ -1,48 +0,0 @@
-<!-- NOTE! This file is auto-generated -->
-
-# Core
-
-### `unit_of`
-
-```nbt
-fn unit_of<T: Dim>(x: T) -> T
-```
-(defined in *core::quantities*)
-
-### `value_of`
-
-```nbt
-fn value_of<T: Dim>(x: T) -> Scalar
-```
-(defined in *core::quantities*)
-
-### `is_nan`
-
-```nbt
-fn is_nan<T: Dim>(n: T) -> Bool
-```
-(defined in *core::quantities*)
-
-### `is_infinite`
-
-```nbt
-fn is_infinite<T: Dim>(n: T) -> Bool
-```
-(defined in *core::quantities*)
-
-### `error`
-Throw a user-defined error.
-
-```nbt
-fn error<T>(message: String) -> T
-```
-(defined in *core::error*)
-
-### `random` (Standard uniform distribution sampling)
-Uniformly samples the interval [0,1).
-
-```nbt
-fn random() -> Scalar
-```
-(defined in *core::random*)
-

+ 36 - 0
book/src/list-functions-math.md

@@ -50,6 +50,34 @@ fn mod<T: Dim>(a: T, b: T) -> T
 ```
 (defined in *core::functions*)
 
+### `unit_of`
+
+```nbt
+fn unit_of<T: Dim>(x: T) -> T
+```
+(defined in *core::quantities*)
+
+### `value_of`
+
+```nbt
+fn value_of<T: Dim>(x: T) -> Scalar
+```
+(defined in *core::quantities*)
+
+### `is_nan`
+
+```nbt
+fn is_nan<T: Dim>(n: T) -> Bool
+```
+(defined in *core::quantities*)
+
+### `is_infinite`
+
+```nbt
+fn is_infinite<T: Dim>(n: T) -> Bool
+```
+(defined in *core::quantities*)
+
 ### `sqrt` (Square root)
 More information [here](https://en.wikipedia.org/wiki/Square_root).
 
@@ -417,6 +445,14 @@ fn acsch(x: Scalar) -> Scalar
 ```
 (defined in *math::trigonometry_extra*)
 
+### `random` (Standard uniform distribution sampling)
+Uniformly samples the interval [0,1).
+
+```nbt
+fn random() -> Scalar
+```
+(defined in *core::random*)
+
 ### `rand_uniform` (Continuous uniform distribution sampling)
 Uniformly samples the interval [a,b) if a<=b or [b,a) if b<a using inversion sampling.
 More information [here](https://en.wikipedia.org/wiki/Continuous_uniform_distribution).

+ 8 - 0
book/src/list-functions-other.md

@@ -2,6 +2,14 @@
 
 # Other
 
+### `error`
+Throw a user-defined error.
+
+```nbt
+fn error<T>(message: String) -> T
+```
+(defined in *core::error*)
+
 ### `from_celsius`
 Converts from degree Celsius to Kelvin.
 More information [here](https://en.wikipedia.org/wiki/Conversion_of_scales_of_temperature).