System.MathF missing

Why System.MathF is not avaiblable in WindowsDX?

Tried the new 3.8 nuget pacakges but seems that it is missing there too.

What do you need from it? Try MathHelper it comes with float functions

We’re porting the game to consoles, so it just a bit annoying to add conditionals just to use (float)Math.Round() or MathF.Round(). MathF.Round() is supported while porting, but Math.Round() don’t.

System.MathF is just a system library. It should be available for any project that targets one of these, according to the docs

.NET

5.0 Preview 4

.NET Core

3.1 3.0 2.2 2.1 2.0

.NET Standard

2.1

Now WindowsDX multi-targets net452 (which isn’t compatible with netstandard2.1) and netcoreapp3.1 (which is). The difference in support between these two is roughly that netcoreapp3.1 supports Windows 7 SP1 or higher, while net452 supports all the way back to Windows Vista SP2. So if your WindowsDX app targets netcoreapp3.1 (which the template already does) then I think you should be able to use System.MathF.

Or are you already doing that but seeing an issue?

1 Like