mathnet / mathnet-spatial

Math.NET Spatial
http://spatial.mathdotnet.com
MIT License
376 stars 132 forks source link

MissingMethodException ToColumnWiseArray on CoordinateSystem.Rotation #162

Closed TeoLazza closed 5 years ago

TeoLazza commented 5 years ago

If I try to execute this: ` Vector3D v=new Vector3D(1,0,0); var alpha = MathNet.Spatial.Units.Angle.FromDegrees(90); Vector3D ax = new Vector3D(0,0,1);

        try
        {
            v.Rotate(ax, alpha);
        }
        catch (Exception ex)
        {
            Console.WriteLine("Error: " + ex);
        }

` I have a MissingMethodException. This is the stack trace:

System.MissingMethodException: Method not found: '!0[] MathNet.Numerics.LinearAlgebra.Matrix`1.ToColumnWiseArray()'.
   at MathNet.Spatial.Euclidean.CoordinateSystem..ctor(Matrix`1 matrix)
   at MathNet.Spatial.Euclidean.CoordinateSystem.Rotation(Angle angle, UnitVector3D v)
   at MathNet.Spatial.Euclidean.UnitVector3D.Rotate(UnitVector3D about, Angle angle)
   at PlantConfigurator.LeoConfigurators.SimulationConfigurator.Configure()

Version MathNet.Numerics v3.20.2 was the last one without this problem. I've tried both versions 4.0.0 and v4.7.0, all with MathNet.Spatial v0.4.0.

cdrnet commented 5 years ago

We use (or at least try to use) semantic versioning, meaning that the major version needs to match. Accordingly, Spatial v0.4.0 is not compatible with Numerics v4.0 and newer.

According to the NuGet package:

Thinking about it, we should make this major version upper bound explicit in the package dependency constraints. Thanks for the remainder!