|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace XML_Documentation
{
/// <summary>
/// Contains fundamental calculations, constants and conversions
/// </summary>
class PhysicsLib
{
/// <summary>
/// retrieves the distance covered with a defined initial velocity, final velocity and acceleration or time in motion
/// </summary>
public double getDistance(double U, double Acc, double timeInMotion)
{
return (U * timeInMotion + 0.5 * Acc * Math.Pow(timeInMotion, 2));
}
/// <summary>
/// retrieves the distance covered with a defined initial velocity, final velocity and acceleration or time in motion
/// </summary>
/// <param name="U">the initial velocity</param>
/// <param name="Acc">the acceleration of the body</param>
/// <param name="V">the final velocity of the body</param>
public double getDistance(double U, double Acc, float V)
{
return ((V * V - U * U) / (2 * Acc));
}
public enum Constants
{
/// <summary>
/// The speed of Light in a vaccum
/// </summary>
C0 = 299792458,
/// <summary>
/// the characteristic impedance
/// </summary>
Z0 = 377
}
public class Conversions
{
/// <summary>
///
/// </summary>
/// <param name="Hp"> Converts Horsepower to Kilowatt</param>
/// <returns></returns>
public double HorsepowerToKiloWatt(double Hp)
{
return (Hp * 0.7457);
}
public double GallonsToLitres(double Gals)
{
return (Gals * 3.7854);
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I have deserted general software development and chosen to enter microprocessors and push around 1s and 0s