Skip to content

Commit fba74b2

Browse files
committed
fix formatting
1 parent 8953802 commit fba74b2

File tree

1 file changed

+57
-57
lines changed

1 file changed

+57
-57
lines changed

third_party/math/README.md

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -5,117 +5,117 @@ A math pacakage written in pure Nuru by [VictorKariuki](https://github.com/Victo
55

66
## Explanation
77

8-
A detailed list of all methods and description and example:
8+
A detailed list of all methods and - Description and - Example:
99

1010
### abs(namba)
1111

12-
Description: Calculates the absolute value of a number.
13-
Example: Hisabati.abs(-42) returns 42.
12+
- Description: Calculates the absolute value of a number.
13+
- Example: Hisabati.abs(-42) returns 42.
1414

1515
### acos(x)
16-
Description: Calculates the arccosine (inverse cosine) of a number in radians.
17-
Example: Hisabati.acos(0.5) returns the arccosine of 0.5.
16+
- Description: Calculates the arccosine (inverse cosine) of a number in radians.
17+
- Example: Hisabati.acos(0.5) returns the arccosine of 0.5.
1818

1919
### acosh(x)
20-
Description: Calculates the inverse hyperbolic cosine of a number.
21-
Example: Hisabati.acosh(2) returns the inverse hyperbolic cosine of 2.
20+
- Description: Calculates the inverse hyperbolic cosine of a number.
21+
- Example: Hisabati.acosh(2) returns the inverse hyperbolic cosine of 2.
2222

2323
### arcsin(x)
24-
Description: Calculates the arcsine (inverse sine) of a number using a Taylor series.
25-
Example: Hisabati.arcsin(0.5) returns the arcsine of 0.5.
24+
- Description: Calculates the arcsine (inverse sine) of a number using a Taylor series.
25+
- Example: Hisabati.arcsin(0.5) returns the arcsine of 0.5.
2626

2727
### arsinh(x)
28-
Description: Calculates the inverse hyperbolic sine of a number.
29-
Example: Hisabati.arsinh(1) returns the inverse hyperbolic sine of 1.
28+
- Description: Calculates the inverse hyperbolic sine of a number.
29+
- Example: Hisabati.arsinh(1) returns the inverse hyperbolic sine of 1.
3030

3131
### atan(x)
32-
Description: Calculates the arctangent (inverse tangent) of a number in radians using a Taylor series.
33-
Example: Hisabati.atan(1) returns the arctangent of 1.
32+
- Description: Calculates the arctangent (inverse tangent) of a number in radians using a Taylor series.
33+
- Example: Hisabati.atan(1) returns the arctangent of 1.
3434

3535
### atan2(y, x)
36-
Description: Calculates the angle in radians between the positive x-axis and the point (x, y).
37-
Example: Hisabati.atan2(1, 1) returns the angle for the point (1, 1).
36+
- Description: Calculates the angle in radians between the positive x-axis and the point (x, y).
37+
- Example: Hisabati.atan2(1, 1) returns the angle for the point (1, 1).
3838

3939
### atanh(x)
40-
Description: Calculates the inverse hyperbolic tangent of a number.
41-
Example: Hisabati.atanh(0.5) returns the inverse hyperbolic tangent of 0.5.
40+
- Description: Calculates the inverse hyperbolic tangent of a number.
41+
- Example: Hisabati.atanh(0.5) returns the inverse hyperbolic tangent of 0.5.
4242

4343
### cbrt(x)
44-
Description: Calculates the cube root of a number.
45-
Example: Hisabati.cbrt(8) returns the cube root of 8.
44+
- Description: Calculates the cube root of a number.
45+
- Example: Hisabati.cbrt(8) returns the cube root of 8.
4646

4747
### ceil(x)
48-
Description: Rounds up to the smallest integer greater than or equal to a given number.
49-
Example: Hisabati.ceil(4.2) returns 5.
48+
- Description: Rounds up to the smallest integer greater than or equal to a given number.
49+
- Example: Hisabati.ceil(4.2) returns 5.
5050

5151
### cos(x, terms)
52-
Description: Calculates the cosine of a number in radians using a Taylor series.
53-
Example: Hisabati.cos(1) returns the cosine of 1.
52+
- Description: Calculates the cosine of a number in radians using a Taylor series.
53+
- Example: Hisabati.cos(1) returns the cosine of 1.
5454

5555
### cosh(x)
56-
Description: Calculates the hyperbolic cosine of a number.
57-
Example: Hisabati.cosh(2) returns the hyperbolic cosine of 2.
56+
- Description: Calculates the hyperbolic cosine of a number.
57+
- Example: Hisabati.cosh(2) returns the hyperbolic cosine of 2.
5858

5959
### exp(x, precision)
60-
Description: Calculates the value of the mathematical constant e raised to the power of x using a Taylor series.
61-
Example: Hisabati.exp(2) returns e^2.
60+
- Description: Calculates the value of the mathematical constant e raised to the power of x using a Taylor series.
61+
- Example: Hisabati.exp(2) returns e^2.
6262

6363
### expm1(x)
64-
Description: Calculates the value of e^x - 1 using a Taylor series.
65-
Example: Hisabati.expm1(1) returns e - 1.
64+
- Description: Calculates the value of e^x - 1 using a Taylor series.
65+
- Example: Hisabati.expm1(1) returns e - 1.
6666

6767
### floor(x)
68-
Description: Rounds down to the largest integer less than or equal to a given number.
69-
Example: Hisabati.floor(4.9) returns 4.
68+
- Description: Rounds down to the largest integer less than or equal to a given number.
69+
- Example: Hisabati.floor(4.9) returns 4.
7070

7171
### hypot(values)
72-
Description: Calculates the Euclidean norm (square root of the sum of squares) of a list of values.
73-
Example: Hisabati.hypot([3, 4]) returns 5, which is the hypotenuse of a right triangle.
72+
- Description: Calculates the Euclidean norm (square root of the sum of squares) of a list of values.
73+
- Example: Hisabati.hypot([3, 4]) returns 5, which is the hypotenuse of a right triangle.
7474

7575
### log(x)
76-
Description: Calculates the natural logarithm of a number using a Taylor series.
77-
Example: Hisabati.log(2) returns the natural logarithm of 2.
76+
- Description: Calculates the natural logarithm of a number using a Taylor series.
77+
- Example: Hisabati.log(2) returns the natural logarithm of 2.
7878

7979
### log10(x)
80-
Description: Calculates the base 10 logarithm of a number using the natural logarithm.
81-
Example: Hisabati.log10(100) returns 2.
80+
- Description: Calculates the base 10 logarithm of a number using the natural logarithm.
81+
- Example: Hisabati.log10(100) returns 2.
8282

8383
### log1p(x)
84-
Description: Calculates the natural logarithm of 1 + x using a Taylor series.
85-
Example: Hisabati.log1p(0.5) returns the natural logarithm of 1.5.
84+
- Description: Calculates the natural logarithm of 1 + x using a Taylor series.
85+
- Example: Hisabati.log1p(0.5) returns the natural logarithm of 1.5.
8686

8787
### log2(x)
88-
Description: Calculates the base 2 logarithm of a number.
89-
Example: Hisabati.log2(8) returns 3.
88+
- Description: Calculates the base 2 logarithm of a number.
89+
- Example: Hisabati.log2(8) returns 3.
9090

9191
### max(numbers)
92-
Description: Returns the largest number from a list of numbers.
93-
Example: Hisabati.max([3, 7, 2, 9]) returns 9.
92+
- Description: Returns the largest number from a list of numbers.
93+
- Example: Hisabati.max([3, 7, 2, 9]) returns 9.
9494

9595
### min(numbers)
96-
Description: Returns the smallest number from a list of numbers.
97-
Example: Hisabati.min([3, 7, 2, 9]) returns 2.
96+
- Description: Returns the smallest number from a list of numbers.
97+
- Example: Hisabati.min([3, 7, 2, 9]) returns 2.
9898

9999
### round(x, method)
100-
Description: Rounds a number to the nearest integer using different rounding methods.
101-
Example: Hisabati.round(3.6, "rpi") rounds to the nearest integer (4) using "round half up."
100+
- Description: Rounds a number to the nearest integer using different rounding methods.
101+
- Example: Hisabati.round(3.6, "rpi") rounds to the nearest integer (4) using "round half up."
102102

103103
### sign(x)
104-
Description: Returns the sign of a number: 1 for positive, -1 for negative, and 0 for zero.
105-
Example: Hisabati.sign(-7) returns -1.
104+
- Description: Returns the sign of a number: 1 for positive, -1 for negative, and 0 for zero.
105+
- Example: Hisabati.sign(-7) returns -1.
106106

107107
### sin(x, terms)
108-
Description: Calculates the sine of a number in radians using a Taylor series.
109-
Example: Hisabati.sin(0.5) returns the sine of 0.5.
108+
- Description: Calculates the sine of a number in radians using a Taylor series.
109+
- Example: Hisabati.sin(0.5) returns the sine of 0.5.
110110

111111
### sinh(x)
112-
Description: Calculates the hyperbolic sine of a number.
113-
Example: Hisabati.sinh(1) returns the hyperbolic sine of 1.
112+
- Description: Calculates the hyperbolic sine of a number.
113+
- Example: Hisabati.sinh(1) returns the hyperbolic sine of 1.
114114

115115
### sqrt(x)
116-
Description: Calculates the square root of a number using the Newton-Raphson method.
117-
Example: Hisabati.sqrt(16) returns 4.
116+
- Description: Calculates the square root of a number using the Newton-Raphson method.
117+
- Example: Hisabati.sqrt(16) returns 4.
118118

119119
### sine(x)
120-
Description: Calculates the sine of a number in radians using a Taylor series.
121-
Example: Hisabati.sine(1.5) returns the sine of 1.5
120+
- Description: Calculates the sine of a number in radians using a Taylor series.
121+
- Example: Hisabati.sine(1.5) returns the sine of 1.5

0 commit comments

Comments
 (0)