Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Add ref/in/out overloads of methods for Vectors and Matrices #25388

Closed
wants to merge 23 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e39f752
Add by-ref overloads to Vector2
mellinoe Jul 5, 2016
0061e5f
Add by-ref overloads to Vector3
mellinoe Jul 5, 2016
9b0c14a
Add by-ref overloads to Vector4
mellinoe Jul 5, 2016
392bb2c
Add by-ref overloads to Matrix3x2
mellinoe Jul 5, 2016
ed79be1
Add by-ref overloads to Matrix4x4
mellinoe Jul 5, 2016
fc8b4c7
Add by-ref overloads to Plane
mellinoe Jul 5, 2016
3ce6e43
Add by-ref overloads to Quaternion
mellinoe Jul 5, 2016
aeb1a3d
Add Vector2 by-ref test cases
mellinoe Jul 6, 2016
9642733
Add Vector3 by-ref test cases
mellinoe Jul 6, 2016
ab9ac24
Add Vector4 by-ref test cases
mellinoe Jul 6, 2016
1ac09a7
Add 4.2.0 contract version for System.Numerics.Vectors
mellinoe Jul 6, 2016
9559100
Add Matrix3x2 by-ref test cases
mellinoe Jul 6, 2016
9f0b4f5
Add Plane by-ref test cases
mellinoe Jul 6, 2016
6ce8c92
Add Quaternion by-ref test cases
mellinoe Jul 6, 2016
a961b93
Add Matrix4x4 by-ref test cases
mellinoe Jul 7, 2016
707f83d
Fix netstandard1.0 and netcoreapp1.1 builds for System.Numerics.Vectors
mellinoe Nov 12, 2016
11676e2
Attempt to fix packaging for System.Numerics.Vectors
mellinoe Nov 15, 2016
e492103
Fix define constants in System.Numerics.Vectors ref project
mellinoe Mar 3, 2017
af04d3d
Merge branch 'master' into RefOverloads
eerhardt Nov 15, 2017
c51f80a
Convert ifdef to use FEATURE pattern.
eerhardt Nov 16, 2017
bb26bc3
Change Numerics.Vectors overloads from 'ref' to 'in' parameters where…
eerhardt Nov 17, 2017
c03a63b
Merge remote-tracking branch 'upstream/master' into RefOverloads
eerhardt Nov 17, 2017
57a6e73
Fix up unnecessary merge changes
eerhardt Nov 20, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into RefOverloads
eerhardt committed Nov 15, 2017
commit af04d3d58501547497b3277562efcc1eef268f28
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@
<ProjectGuid>{650277B5-9423-4ACE-BB54-2659995B21C7}</ProjectGuid>
<DefineConstants Condition="'$(TargetGroup)' == 'netcoreapp'">$(DefineConstants);netcoreapp</DefineConstants>
<DefineConstants Condition="'$(TargetGroup)' == 'uap'">$(DefineConstants);uap</DefineConstants>
<IsPartialFacadeAssembly Condition="'$(TargetGroup)' == 'netfx' OR '$(TargetGroup)' == 'net46'">true</IsPartialFacadeAssembly>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net46-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net46-Release|AnyCPU'" />
12 changes: 6 additions & 6 deletions src/System.Numerics.Vectors/src/System/Numerics/Matrix4x4.cs
Original file line number Diff line number Diff line change
@@ -2753,9 +2753,9 @@ public static bool Decompose(Matrix4x4 matrix, out Vector3 scale, out Quaternion
uint cc;
float fAbsX, fAbsY, fAbsZ;

fAbsX = MathF.Abs(pVectorBasis[a]->X);
fAbsY = MathF.Abs(pVectorBasis[a]->Y);
fAbsZ = MathF.Abs(pVectorBasis[a]->Z);
fAbsX = (float)Math.Abs(pVectorBasis[a]->X);
fAbsY = (float)Math.Abs(pVectorBasis[a]->Y);
fAbsZ = (float)Math.Abs(pVectorBasis[a]->Z);

#region Ranking
if (fAbsX < fAbsY)
@@ -2954,9 +2954,9 @@ public static void Decompose(ref Matrix4x4 matrix, out bool succeeded, out Vecto
uint cc;
float fAbsX, fAbsY, fAbsZ;

fAbsX = (float)Math.Abs(pVectorBasis[a]->X);
fAbsY = (float)Math.Abs(pVectorBasis[a]->Y);
fAbsZ = (float)Math.Abs(pVectorBasis[a]->Z);
fAbsX = MathF.Abs(pVectorBasis[a]->X);
fAbsY = MathF.Abs(pVectorBasis[a]->Y);
fAbsZ = MathF.Abs(pVectorBasis[a]->Z);

#region Ranking
if (fAbsX < fAbsY)
8 changes: 4 additions & 4 deletions src/System.Numerics.Vectors/tests/Vector2Tests.cs
Original file line number Diff line number Diff line change
@@ -587,10 +587,10 @@ public void Vector2TransformNormalTest()
Vector2 actual;

actual = Vector2.TransformNormal(v, m);
Assert.Equal(expected, actual);
Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Tranform did not return the expected value.");

Vector2.TransformNormal(ref v, ref m, out actual);
Assert.Equal(expected, actual);
Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Tranform(ref, ref, out) did not return the expected value.");
}

// A test for TransformNormal (Vector2f, Matrix3x2)
@@ -606,10 +606,10 @@ public void Vector2TransformNormal3x2Test()
Vector2 actual;

actual = Vector2.TransformNormal(v, m);
Assert.Equal(expected, actual);
Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Transform did not return the expected value.");

Vector2.TransformNormal(ref v, ref m, out actual);
Assert.Equal(expected, actual);
Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Transform(ref, ref, out) did not return the expected value.");
}

// A test for Transform (Vector2f, Quaternion)
You are viewing a condensed version of this merge commit. You can view the full changes here.