From 4a31379f92a606ae40c0803c393cab7e73794689 Mon Sep 17 00:00:00 2001 From: Fraser Waters Date: Mon, 28 Aug 2017 15:52:04 +0100 Subject: [PATCH] Add remarks about not reusing the same variable to ref/out methods --- src/OpenTK/Math/Vector3.cs | 9 +++++++++ src/OpenTK/Math/Vector3d.cs | 14 ++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/OpenTK/Math/Vector3.cs b/src/OpenTK/Math/Vector3.cs index 584bf393..b37a7184 100644 --- a/src/OpenTK/Math/Vector3.cs +++ b/src/OpenTK/Math/Vector3.cs @@ -655,6 +655,11 @@ namespace OpenTK /// /// Caclulate the cross (vector) product of two vectors /// + /// + /// It is incorrect to call this method passing the same variable for + /// as for or + /// . + /// /// First operand /// Second operand /// The cross product of the two inputs @@ -747,6 +752,10 @@ namespace OpenTK /// Transform a direction vector by the given Matrix /// Assumes the matrix has a bottom row of (0,0,0,1), that is the translation part is ignored. /// + /// + /// It is incorrect to call this method passing the same variable for + /// as for . + /// /// The vector to transform /// The desired transformation /// The transformed vector diff --git a/src/OpenTK/Math/Vector3d.cs b/src/OpenTK/Math/Vector3d.cs index 16525029..a2d4109e 100644 --- a/src/OpenTK/Math/Vector3d.cs +++ b/src/OpenTK/Math/Vector3d.cs @@ -649,6 +649,11 @@ namespace OpenTK /// /// Caclulate the cross (vector) product of two vectors /// + /// + /// It is incorrect to call this method passing the same variable for + /// as for or + /// . + /// /// First operand /// Second operand /// The cross product of the two inputs @@ -741,6 +746,10 @@ namespace OpenTK /// Transform a direction vector by the given Matrix /// Assumes the matrix has a bottom row of (0,0,0,1), that is the translation part is ignored. /// + /// + /// It is incorrect to call this method passing the same variable for + /// as for . + /// /// The vector to transform /// The desired transformation /// The transformed vector @@ -870,6 +879,11 @@ namespace OpenTK } /// Transform a Vector by the given Matrix + /// + /// It is incorrect to call this method passing the same variable for + /// as for or + /// . + /// /// The vector to transform /// The desired transformation /// The transformed vector