Skip to content

Commit

Permalink
Add DegreesToRadians() and RadiansToDegrees() support for float/double.
Browse files Browse the repository at this point in the history
  • Loading branch information
lauxjpn committed Sep 29, 2023
1 parent b78b8c0 commit 1550b88
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/EFCore.MySql/Query/Internal/MySqlMathMethodTranslator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ public class MySqlMathMethodTranslator : IMethodCallTranslator
{ typeof(Math).GetRuntimeMethod(nameof(Math.Cos), new[] { typeof(double) }), ("COS", true) },
{ typeof(MathF).GetRuntimeMethod(nameof(MathF.Cos), new[] { typeof(float) }), ("COS", true) },

{ typeof(double).GetRuntimeMethod(nameof(double.DegreesToRadians), new[] { typeof(double) })!, ("RADIANS", true) },
{ typeof(float).GetRuntimeMethod(nameof(float.DegreesToRadians), new[] { typeof(float) })!, ("RADIANS", true) },
{ typeof(double).GetRuntimeMethod(nameof(double.RadiansToDegrees), new[] { typeof(double) })!, ("DEGREES", true) },
{ typeof(float).GetRuntimeMethod(nameof(float.RadiansToDegrees), new[] { typeof(float) })!, ("DEGREES", true) },

{ typeof(Math).GetRuntimeMethod(nameof(Math.Exp), new[] { typeof(double) }), ("EXP", true) },
{ typeof(MathF).GetRuntimeMethod(nameof(MathF.Exp), new[] { typeof(float) }), ("EXP", true) },

Expand Down

0 comments on commit 1550b88

Please sign in to comment.