Added 1-parameter constructors.
This commit is contained in:
parent
e91af6c70b
commit
adc4d1ae59
9 changed files with 132 additions and 0 deletions
|
@ -50,6 +50,16 @@ namespace OpenTK
|
|||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new instance.
|
||||
/// </summary>
|
||||
/// <param name="value">The value that will initialize this instance.</param>
|
||||
public Vector2(float value)
|
||||
{
|
||||
X = value;
|
||||
Y = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new Vector2.
|
||||
/// </summary>
|
||||
|
|
|
@ -69,6 +69,16 @@ namespace OpenTK
|
|||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new instance.
|
||||
/// </summary>
|
||||
/// <param name="value">The value that will initialize this instance.</param>
|
||||
public Vector2d(double value)
|
||||
{
|
||||
X = value;
|
||||
Y = value;
|
||||
}
|
||||
|
||||
/// <summary>Constructs left vector with the given coordinates.</summary>
|
||||
/// <param name="x">The X coordinate.</param>
|
||||
/// <param name="y">The Y coordinate.</param>
|
||||
|
|
|
@ -46,6 +46,26 @@ namespace OpenTK
|
|||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new instance.
|
||||
/// </summary>
|
||||
/// <param name="value">The value that will initialize this instance.</param>
|
||||
public Vector2h(Half value)
|
||||
{
|
||||
X = value;
|
||||
Y = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new instance.
|
||||
/// </summary>
|
||||
/// <param name="value">The value that will initialize this instance.</param>
|
||||
public Vector2h(Single value)
|
||||
{
|
||||
X = new Half(value);
|
||||
Y = new Half(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The new Half2 instance will avoid conversion and copy directly from the Half parameters.
|
||||
/// </summary>
|
||||
|
|
|
@ -58,6 +58,17 @@ namespace OpenTK
|
|||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new instance.
|
||||
/// </summary>
|
||||
/// <param name="value">The value that will initialize this instance.</param>
|
||||
public Vector3(float value)
|
||||
{
|
||||
X = value;
|
||||
Y = value;
|
||||
Z = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new Vector3.
|
||||
/// </summary>
|
||||
|
|
|
@ -56,6 +56,17 @@ namespace OpenTK
|
|||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new instance.
|
||||
/// </summary>
|
||||
/// <param name="value">The value that will initialize this instance.</param>
|
||||
public Vector3d(double value)
|
||||
{
|
||||
X = value;
|
||||
Y = value;
|
||||
Z = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new Vector3.
|
||||
/// </summary>
|
||||
|
|
|
@ -51,6 +51,28 @@ namespace OpenTK
|
|||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new instance.
|
||||
/// </summary>
|
||||
/// <param name="value">The value that will initialize this instance.</param>
|
||||
public Vector3h(Half value)
|
||||
{
|
||||
X = value;
|
||||
Y = value;
|
||||
Z = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new instance.
|
||||
/// </summary>
|
||||
/// <param name="value">The value that will initialize this instance.</param>
|
||||
public Vector3h(Single value)
|
||||
{
|
||||
X = new Half(value);
|
||||
Y = new Half(value);
|
||||
Z = new Half(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The new Half3 instance will avoid conversion and copy directly from the Half parameters.
|
||||
/// </summary>
|
||||
|
|
|
@ -96,6 +96,18 @@ namespace OpenTK
|
|||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new instance.
|
||||
/// </summary>
|
||||
/// <param name="value">The value that will initialize this instance.</param>
|
||||
public Vector4(float value)
|
||||
{
|
||||
X = value;
|
||||
Y = value;
|
||||
Z = value;
|
||||
W = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new Vector4.
|
||||
/// </summary>
|
||||
|
|
|
@ -94,6 +94,18 @@ namespace OpenTK
|
|||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new instance.
|
||||
/// </summary>
|
||||
/// <param name="value">The value that will initialize this instance.</param>
|
||||
public Vector4d(double value)
|
||||
{
|
||||
X = value;
|
||||
Y = value;
|
||||
Z = value;
|
||||
W = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new Vector4d.
|
||||
/// </summary>
|
||||
|
|
|
@ -54,6 +54,30 @@ namespace OpenTK
|
|||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new instance.
|
||||
/// </summary>
|
||||
/// <param name="value">The value that will initialize this instance.</param>
|
||||
public Vector4h(Half value)
|
||||
{
|
||||
X = value;
|
||||
Y = value;
|
||||
Z = value;
|
||||
W = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new instance.
|
||||
/// </summary>
|
||||
/// <param name="value">The value that will initialize this instance.</param>
|
||||
public Vector4h(Single value)
|
||||
{
|
||||
X = new Half(value);
|
||||
Y = new Half(value);
|
||||
Z = new Half(value);
|
||||
W = new Half(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The new Half4 instance will avoid conversion and copy directly from the Half parameters.
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in a new issue