Fix .NET Standard compatibility:
- Replace double.DegreesToRadians/RadiansToDegrees with Math-based conversions - Replace Random.Shared with thread-local Random for thread safety
This commit is contained in:
parent
8dd20b2cb8
commit
5f7b862d5e
3 changed files with 9 additions and 11 deletions
|
@ -26,8 +26,8 @@
|
|||
var input = _args[0].Value;
|
||||
decimal value = Convert.ToDecimal(input.Value);
|
||||
|
||||
// Convert degrees to radians
|
||||
return new FunctionValue(FunctionValueType.Numeric, double.DegreesToRadians((double)value));
|
||||
// Convert degrees to radians (compatible with .NET Standard)
|
||||
return new FunctionValue(FunctionValueType.Numeric, (double)value * (Math.PI / 180.0));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue