NuGet package for Physics calculation support of most(ly) used equations.
Install via NuGet package manager console:
PM> Install-Package PhysicsCalculator
Or clone the repository & pull in the projects directly.
Supported physics equations (all return 8 bytes size floating-point double
):
-
Kinematics
:AverageVelocity(r, t)
, where r - change in position vector, t - timeAverageAcceleration(v, t)
, where v - difference in velocity vector, t - timeTimeFromAverageAcceleration(v, v0, a)
, where v and v0 - velocities, a - average accelerationAngularVelocity(theta, t)
, where theta - angular rotation, t - time
-
SpecialRelativity
:LenghtInvariant(x1, y1, z1, x2, y2, z2)
, where x1, y1, z1, x2, y2, z2 - coordinatesTimeIntervalInvariant(t1, t2)
, where t1, t2 - timeLorentzFactor(v)
, where v - relative velocity between frames in the x-directionTimeDilation(t, v)
, where t - time in observers own frame of reference, v - speed of the moving objectLengthContraction(l0, v)
, where l0 - length measured by the observers on reference frame, v - speed of the object
Supported constants:
SpeedOfLight
(in m/s)
- C# & .NET5
double velocity = PhysicsCalculator.Kinematics.AverageVelocity(50.55, 10);
double lorentzFactor = PhysicsCalculator.SpecialRelativity.LorentzFactor(15.15);
MIT License.