Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where do I get the numeric types for UAP/UWP #76

Closed
blelem opened this issue May 13, 2015 · 1 comment
Closed

Where do I get the numeric types for UAP/UWP #76

blelem opened this issue May 13, 2015 · 1 comment

Comments

@blelem
Copy link

blelem commented May 13, 2015

I am not sure where I should get the numeric types for my UAP.

The vector2 doc here http://microsoft.github.io/Win2D/html/T_Microsoft_Graphics_Canvas_Numerics_Vector2.htm says:
When targeting the Windows universal app platform, this struct is moved to the namespace Windows.Foundation.Numerics.

On my Win10 build, Windows.Foundation.Numerics.Vector2 is internal, I can't use it.

I then moved on to the UAP doc: http://microsoft.github.io/Win2D/html/UAP.htm, which says:
"For the universal app platform it is implemented by the CLR assembly System.Numerics.Vectors."

I am not too well versed how the CLR handles assemblies ,so the sentence above didn't help me much :-( I tried "using System.Numerics;" in my C#, but only Complex and BigInteger are defined there.

I found a package from nuGet, "System.numerics.vectors" that I installed, and it does seem to do the trick.
Is that the right thing to do for a UAP app? Get System.numerics.vectors from Nuget?

@shawnhar
Copy link
Member

Yes, http://www.nuget.org/packages/System.Numerics.Vectors is the right place to get these types when building for Windows 10 / Universal Windows Platform.

If you start your C# project using one of the VS templates from the latest CTP release of Visual Studio 2015, that NuGet reference will be added by default. You will only need to manually add the package if you are upgrading a project from some earlier VS CTP release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants