-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
1 changed file
with
66 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Energies | ||
This page is about the `Energies` class available in [`PeyrSharp.Core.Converters`](/core/converters.md). | ||
You can find here all of its methods. | ||
|
||
::: info | ||
This class is `static`. | ||
::: | ||
|
||
## Compatibility | ||
|
||
The `Energies` class is part of the `PeyrSharp.Core` module, which is compatible with all of these frameworks and platforms: | ||
|
||
| Package/Platform | Windows | macOS | Linux + others | | ||
|------------------ |--------- |------- |---------------- | | ||
| Core | ✅ | ✅ | ✅ | | ||
| **Framework** | **.NET 5** | **.NET 6** | **.NET 7** | | ||
| Core | ✅ | ✅ | ✅ | | ||
|
||
## Methods | ||
### CaloriesToJoules(calories) | ||
#### Definition | ||
|
||
Converts calories to joules. | ||
|
||
#### Arguments | ||
|
||
| Type | Name | Meaning | | ||
|----------|------------|-----------------------------------------------------| | ||
| `double` | `calories` | The amount of energy in calories to be converted. | | ||
|
||
#### Returns | ||
|
||
The equivalent amount of energy in joules. | ||
|
||
#### Usage | ||
|
||
~~~ c# | ||
using PeyrSharp.Core.Converters; | ||
|
||
double calories = 100.0; | ||
double joules = Energies.CaloriesToJoules(calories); | ||
~~~ | ||
|
||
### JoulesToCalories(joules) | ||
#### Definition | ||
|
||
Converts joules to calories. | ||
|
||
#### Arguments | ||
|
||
| Type | Name | Meaning | | ||
| -------- | -------- | ---------------------------- | | ||
| `double` | `joules` | The amount of energy in joules. | | ||
|
||
#### Returns | ||
|
||
The equivalent amount of energy in calories. | ||
|
||
#### Usage | ||
|
||
~~~ c# | ||
using PeyrSharp.Core.Converters; | ||
|
||
double joules = 1000.0; | ||
double calories = Energies.JoulesToCalories(joules); | ||
~~~ |