Eliminated cls-compliance warnings in the math library

This commit is contained in:
Stefanos A 2013-12-15 22:02:08 +01:00
parent aeb7a72d79
commit f579d0fd81
10 changed files with 28 additions and 2 deletions

View file

@ -77,14 +77,15 @@ namespace OpenTK
/// Gets or sets an OpenTK.Vector3 with the X, Y and Z components of this instance.
/// </summary>
[Obsolete("Use Xyz property instead.")]
[CLSCompliant(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
[XmlIgnore]
[CLSCompliant(false)]
public Vector3 XYZ { get { return Xyz; } set { Xyz = value; } }
/// <summary>
/// Gets or sets an OpenTK.Vector3 with the X, Y and Z components of this instance.
/// </summary>
[CLSCompliant(false)]
public Vector3 Xyz { get { return xyz; } set { xyz = value; } }
/// <summary>

View file

@ -131,6 +131,7 @@ namespace OpenTK
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[CLSCompliant(false)]
[Obsolete("Use static Add() method instead.")]
public void Add(Vector2 right)
{
@ -154,6 +155,7 @@ namespace OpenTK
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[CLSCompliant(false)]
[Obsolete("Use static Subtract() method instead.")]
public void Sub(Vector2 right)
{
@ -343,6 +345,7 @@ namespace OpenTK
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
[CLSCompliant(false)]
[Obsolete("Use static Multiply() method instead.")]
public void Scale(Vector2 scale)
{

View file

@ -114,6 +114,7 @@ namespace OpenTK
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[CLSCompliant(false)]
[Obsolete("Use static Add() method instead.")]
public void Add(Vector2d right)
{
@ -137,6 +138,7 @@ namespace OpenTK
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[CLSCompliant(false)]
[Obsolete("Use static Subtract() method instead.")]
public void Sub(Vector2d right)
{
@ -290,6 +292,7 @@ namespace OpenTK
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
[CLSCompliant(false)]
[Obsolete("Use static Multiply() method instead.")]
public void Scale(Vector2d scale)
{

View file

@ -150,6 +150,7 @@ namespace OpenTK
/// The new Half2 instance will convert the Vector2d into 16-bit half-precision floating-point.
/// </summary>
/// <param name="v">OpenTK.Vector2d</param>
[CLSCompliant(false)]
public Vector2h(Vector2d v)
{
X = new Half(v.X);
@ -161,6 +162,7 @@ namespace OpenTK
/// </summary>
/// <param name="v">OpenTK.Vector2d</param>
/// <param name="throwOnError">Enable checks that will throw if the conversion result is not meaningful.</param>
[CLSCompliant(false)]
public Vector2h(Vector2d v, bool throwOnError)
{
X = new Half(v.X, throwOnError);

View file

@ -143,6 +143,7 @@ namespace OpenTK
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[CLSCompliant(false)]
[Obsolete("Use static Add() method instead.")]
public void Add(Vector3 right)
{
@ -168,6 +169,7 @@ namespace OpenTK
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[CLSCompliant(false)]
[Obsolete("Use static Subtract() method instead.")]
public void Sub(Vector3 right)
{
@ -335,6 +337,7 @@ namespace OpenTK
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
[CLSCompliant(false)]
[Obsolete("Use static Multiply() method instead.")]
public void Scale(Vector3 scale)
{

View file

@ -141,6 +141,7 @@ namespace OpenTK
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[CLSCompliant(false)]
[Obsolete("Use static Add() method instead.")]
public void Add(Vector3d right)
{
@ -166,6 +167,7 @@ namespace OpenTK
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[CLSCompliant(false)]
[Obsolete("Use static Subtract() method instead.")]
public void Sub(Vector3d right)
{
@ -335,6 +337,7 @@ namespace OpenTK
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
[Obsolete("Use static Multiply() method instead.")]
[CLSCompliant(false)]
public void Scale(Vector3d scale)
{
this.X *= scale.X;
@ -344,8 +347,8 @@ namespace OpenTK
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
[CLSCompliant(false)]
[Obsolete("Use static Multiply() method instead.")]
[CLSCompliant(false)]
public void Scale(ref Vector3d scale)
{
this.X *= scale.X;

View file

@ -155,6 +155,7 @@ namespace OpenTK
/// </summary>
/// <param name="v">OpenTK.Vector3</param>
/// <param name="throwOnError">Enable checks that will throw if the conversion result is not meaningful.</param>
[CLSCompliant(false)]
public Vector3h(ref Vector3 v, bool throwOnError)
{
X = new Half(v.X, throwOnError);
@ -166,6 +167,7 @@ namespace OpenTK
/// The new Half3 instance will convert the Vector3d into 16-bit half-precision floating-point.
/// </summary>
/// <param name="v">OpenTK.Vector3d</param>
[CLSCompliant(false)]
public Vector3h(Vector3d v)
{
X = new Half(v.X);
@ -178,6 +180,7 @@ namespace OpenTK
/// </summary>
/// <param name="v">OpenTK.Vector3d</param>
/// <param name="throwOnError">Enable checks that will throw if the conversion result is not meaningful.</param>
[CLSCompliant(false)]
public Vector3h(Vector3d v, bool throwOnError)
{
X = new Half(v.X, throwOnError);

View file

@ -203,6 +203,7 @@ namespace OpenTK
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[CLSCompliant(false)]
[Obsolete("Use static Add() method instead.")]
public void Add(Vector4 right)
{
@ -230,6 +231,7 @@ namespace OpenTK
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[CLSCompliant(false)]
[Obsolete("Use static Subtract() method instead.")]
public void Sub(Vector4 right)
{
@ -405,6 +407,7 @@ namespace OpenTK
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
[CLSCompliant(false)]
[Obsolete("Use static Multiply() method instead.")]
public void Scale(Vector4 scale)
{

View file

@ -201,6 +201,7 @@ namespace OpenTK
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[CLSCompliant(false)]
[Obsolete("Use static Add() method instead.")]
public void Add(Vector4d right)
{
@ -228,6 +229,7 @@ namespace OpenTK
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[CLSCompliant(false)]
[Obsolete("Use static Subtract() method instead.")]
public void Sub(Vector4d right)
{
@ -402,6 +404,7 @@ namespace OpenTK
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
[CLSCompliant(false)]
[Obsolete("Use static Multiply() method instead.")]
public void Scale(Vector4d scale)
{

View file

@ -181,6 +181,7 @@ namespace OpenTK
/// The new Half4 instance will convert the Vector4d into 16-bit half-precision floating-point.
/// </summary>
/// <param name="v">OpenTK.Vector4d</param>
[CLSCompliant(false)]
public Vector4h(Vector4d v)
{
X = new Half(v.X);
@ -194,6 +195,7 @@ namespace OpenTK
/// </summary>
/// <param name="v">OpenTK.Vector4d</param>
/// <param name="throwOnError">Enable checks that will throw if the conversion result is not meaningful.</param>
[CLSCompliant(false)]
public Vector4h(Vector4d v, bool throwOnError)
{
X = new Half(v.X, throwOnError);