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:
codex 2025-08-26 00:39:43 -05:00
commit 5f7b862d5e
3 changed files with 9 additions and 11 deletions

View file

@ -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));
});
}
}