Skip to content

Energies

This page is about the Energies class available in PeyrSharp.Core.Converters. 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/PlatformWindowsmacOSLinux + others
Core
Framework.NET 6.NET 7.NET 8
Core

Methods

CaloriesToJoules(calories)

Definition

Converts calories to joules.

Arguments

TypeNameMeaning
doublecaloriesThe 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

TypeNameMeaning
doublejoulesThe 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);

Released under the MIT License.