-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
fanyushun
committed
Jul 19, 2024
1 parent
7986b42
commit 21c580a
Showing
28 changed files
with
658 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[conversion-library](../index.md) / binaryToDecimal | ||
|
||
# Function: binaryToDecimal() | ||
|
||
```ts | ||
function binaryToDecimal(str: string): number | ||
``` | ||
|
||
binary to decimal | ||
|
||
## Parameters | ||
|
||
• **str**: `string` | ||
|
||
Enter a value of string type | ||
|
||
## Returns | ||
|
||
`number` | ||
|
||
Return the corresponding number | ||
|
||
## Example | ||
|
||
```ts | ||
binaryToDecimal('1010') // 10 | ||
``` | ||
|
||
## Defined in | ||
|
||
[decimalAndBinary.ts:51](https://github.com/fxss5201/conversion-library/blob/7986b4281d32fb392b20396e877bb0afeec7e5dc/lib/decimal-conversion/decimalAndBinary.ts#L51) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[conversion-library](../index.md) / decimalToBinary | ||
|
||
# Function: decimalToBinary() | ||
|
||
```ts | ||
function decimalToBinary(num: number): string | ||
``` | ||
|
||
decimal to binary | ||
|
||
## Parameters | ||
|
||
• **num**: `number` | ||
|
||
Enter a value of number type | ||
|
||
## Returns | ||
|
||
`string` | ||
|
||
Return the corresponding binary | ||
|
||
## Example | ||
|
||
```ts | ||
decimalToBinary(10) // '1010' | ||
``` | ||
|
||
## Defined in | ||
|
||
[decimalAndBinary.ts:14](https://github.com/fxss5201/conversion-library/blob/7986b4281d32fb392b20396e877bb0afeec7e5dc/lib/decimal-conversion/decimalAndBinary.ts#L14) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[conversion-library](../index.md) / decimalToOtherBase | ||
|
||
# Function: decimalToOtherBase() | ||
|
||
```ts | ||
function decimalToOtherBase(num: number, base: number): string | ||
``` | ||
|
||
decimal to other base | ||
|
||
## Parameters | ||
|
||
• **num**: `number` | ||
|
||
Enter a value of number type | ||
|
||
• **base**: `number` | ||
|
||
Enter a value of number type | ||
|
||
## Returns | ||
|
||
`string` | ||
|
||
Return the corresponding string | ||
|
||
## Example | ||
|
||
```ts | ||
decimalToOtherBase(10, 2) // '1010' | ||
``` | ||
|
||
## Defined in | ||
|
||
[decimalAndOtherBase.ts:17](https://github.com/fxss5201/conversion-library/blob/7986b4281d32fb392b20396e877bb0afeec7e5dc/lib/decimal-conversion/decimalAndOtherBase.ts#L17) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[conversion-library](../index.md) / otherBaseToDecimal | ||
|
||
# Function: otherBaseToDecimal() | ||
|
||
```ts | ||
function otherBaseToDecimal(str: string, base: number): number | ||
``` | ||
|
||
other base to decimal | ||
|
||
## Parameters | ||
|
||
• **str**: `string` | ||
|
||
Enter a value of string type | ||
|
||
• **base**: `number` | ||
|
||
Enter a value of number type | ||
|
||
## Returns | ||
|
||
`number` | ||
|
||
Return the corresponding number | ||
|
||
## Example | ||
|
||
```ts | ||
decimalToOtherBase('1010', 2) // 10 | ||
``` | ||
|
||
## Defined in | ||
|
||
[decimalAndOtherBase.ts:60](https://github.com/fxss5201/conversion-library/blob/7986b4281d32fb392b20396e877bb0afeec7e5dc/lib/decimal-conversion/decimalAndOtherBase.ts#L60) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[conversion-library](../index.md) / otherToTen | ||
|
||
# Function: otherToTen() | ||
|
||
```ts | ||
function otherToTen(str: string, base: number): number | ||
``` | ||
|
||
other base to decimal | ||
|
||
## Parameters | ||
|
||
• **str**: `string` | ||
|
||
Enter a value of string type | ||
|
||
• **base**: `number` | ||
|
||
Enter a value of number type | ||
|
||
## Returns | ||
|
||
`number` | ||
|
||
Return the corresponding number | ||
|
||
## Example | ||
|
||
```ts | ||
decimalToOtherBase('1010', 2) // 10 | ||
``` | ||
|
||
## Defined in | ||
|
||
[decimalAndOtherBase.ts:89](https://github.com/fxss5201/conversion-library/blob/7986b4281d32fb392b20396e877bb0afeec7e5dc/lib/decimal-conversion/decimalAndOtherBase.ts#L89) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[conversion-library](../index.md) / tenToOther | ||
|
||
# Function: tenToOther() | ||
|
||
```ts | ||
function tenToOther(num: number, base: number): string | ||
``` | ||
|
||
decimal to other base | ||
|
||
## Parameters | ||
|
||
• **num**: `number` | ||
|
||
Enter a value of number type | ||
|
||
• **base**: `number` | ||
|
||
Enter a value of number type | ||
|
||
## Returns | ||
|
||
`string` | ||
|
||
Return the corresponding string | ||
|
||
## Example | ||
|
||
```ts | ||
decimalToOtherBase(10, 2) // '1010' | ||
``` | ||
|
||
## Defined in | ||
|
||
[decimalAndOtherBase.ts:44](https://github.com/fxss5201/conversion-library/blob/7986b4281d32fb392b20396e877bb0afeec7e5dc/lib/decimal-conversion/decimalAndOtherBase.ts#L44) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[conversion-library](../index.md) / tenToTwo | ||
|
||
# Function: tenToTwo() | ||
|
||
```ts | ||
function tenToTwo(num: number): string | ||
``` | ||
|
||
decimal to binary | ||
|
||
## Parameters | ||
|
||
• **num**: `number` | ||
|
||
Enter a value of number type | ||
|
||
## Returns | ||
|
||
`string` | ||
|
||
Return the corresponding binary | ||
|
||
## Example | ||
|
||
```ts | ||
decimalToBinary(10) // '1010' | ||
``` | ||
|
||
## Defined in | ||
|
||
[decimalAndBinary.ts:36](https://github.com/fxss5201/conversion-library/blob/7986b4281d32fb392b20396e877bb0afeec7e5dc/lib/decimal-conversion/decimalAndBinary.ts#L36) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[conversion-library](../index.md) / twoToTen | ||
|
||
# Function: twoToTen() | ||
|
||
```ts | ||
function twoToTen(str: string): number | ||
``` | ||
|
||
binary to decimal | ||
|
||
## Parameters | ||
|
||
• **str**: `string` | ||
|
||
Enter a value of string type | ||
|
||
## Returns | ||
|
||
`number` | ||
|
||
Return the corresponding number | ||
|
||
## Example | ||
|
||
```ts | ||
binaryToDecimal('1010') // 10 | ||
``` | ||
|
||
## Defined in | ||
|
||
[decimalAndBinary.ts:74](https://github.com/fxss5201/conversion-library/blob/7986b4281d32fb392b20396e877bb0afeec7e5dc/lib/decimal-conversion/decimalAndBinary.ts#L74) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
# api methods | ||
# conversion-library | ||
|
||
## decimal-conversion | ||
|
||
- [binaryToDecimal](functions/binaryToDecimal.md) | ||
- [decimalToBinary](functions/decimalToBinary.md) | ||
- [decimalToOtherBase](functions/decimalToOtherBase.md) | ||
- [otherBaseToDecimal](functions/otherBaseToDecimal.md) | ||
- [otherToTen](functions/otherToTen.md) | ||
- [tenToOther](functions/tenToOther.md) | ||
- [tenToTwo](functions/tenToTwo.md) | ||
- [twoToTen](functions/twoToTen.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"text":"decimal-conversion","collapsed":true,"items":[{"text":"binaryToDecimal","link":"/api/functions/binaryToDecimal.md"},{"text":"decimalToBinary","link":"/api/functions/decimalToBinary.md"},{"text":"decimalToOtherBase","link":"/api/functions/decimalToOtherBase.md"},{"text":"otherBaseToDecimal","link":"/api/functions/otherBaseToDecimal.md"},{"text":"otherToTen","link":"/api/functions/otherToTen.md"},{"text":"tenToOther","link":"/api/functions/tenToOther.md"},{"text":"tenToTwo","link":"/api/functions/tenToTwo.md"},{"text":"twoToTen","link":"/api/functions/twoToTen.md"}]}] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.