Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 9edd10ef authored by Michael KRISPER's avatar Michael KRISPER
Browse files

added implicit conversion from NewtonMeter to Joule in SI

parent 4aa47ddf
Branches
Tags
No related merge requests found
...@@ -37,6 +37,7 @@ using System.Linq; ...@@ -37,6 +37,7 @@ using System.Linq;
using System.Linq.Expressions; using System.Linq.Expressions;
using System.Reflection; using System.Reflection;
using Newtonsoft.Json; using Newtonsoft.Json;
using System.Runtime.CompilerServices;
using TUGraz.VectoCommon.Exceptions; using TUGraz.VectoCommon.Exceptions;
// ReSharper disable ClassNeverInstantiated.Global // ReSharper disable ClassNeverInstantiated.Global
...@@ -942,7 +943,7 @@ namespace TUGraz.VectoCommon.Utils ...@@ -942,7 +943,7 @@ namespace TUGraz.VectoCommon.Utils
/// <summary> /// <summary>
/// SI Class for NewtonMeter [Nm]. /// SI Class for NewtonMeter [Nm].
/// N = kgm/s^2 /// Nm = kgm^2/s^2
/// </summary> /// </summary>
public class NewtonMeter : SIBase<NewtonMeter> public class NewtonMeter : SIBase<NewtonMeter>
{ {
...@@ -994,6 +995,10 @@ namespace TUGraz.VectoCommon.Utils ...@@ -994,6 +995,10 @@ namespace TUGraz.VectoCommon.Utils
{ {
return SIBase<NewtonMeterSecond>.Create(newtonMeter.Val / perSecond.Value()); return SIBase<NewtonMeterSecond>.Create(newtonMeter.Val / perSecond.Value());
} }
public static implicit operator Joule(NewtonMeter self) {
return SIBase<Joule>.Create(self.Val);
}
} }
/// <summary> /// <summary>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment