/// <summary> /// Initializes a new instance of the <see cref="T:Xenko.Core.Mathematics.Half2" /> structure. /// </summary> /// <param name="value">The value to set for both the X and Y components.</param> public Half2(float value) { this.X = (Half)value; this.Y = (Half)value; }
/// <summary> /// Initializes a new instance of the <see cref="T:Xenko.Core.Mathematics.Half2" /> structure. /// </summary> /// <param name="x">The X component.</param> /// <param name="y">The Y component.</param> public Half2(float x, float y) { this.X = (Half)x; this.Y = (Half)y; }
/// <summary> /// Initializes a new instance of the <see cref="T:Xenko.Core.Mathematics.Half2" /> structure. /// </summary> /// <param name="value">The value to set for both the X and Y components.</param> public Half2(Half value) { this.X = value; this.Y = value; }
/// <summary> /// Initializes a new instance of the <see cref="T:Xenko.Core.Mathematics.Half2" /> structure. /// </summary> /// <param name="x">The X component.</param> /// <param name="y">The Y component.</param> public Half2(Half x, Half y) { this.X = x; this.Y = y; }
/// <summary> /// Returns a value that indicates whether the current instance is equal to the specified object. /// </summary> /// <param name = "other">Object to make the comparison with.</param> /// <returns> /// <c>true</c> if the current instance is equal to the specified object; <c>false</c> otherwise.</returns> public bool Equals(Half other) { return(other.value == value); }
/// <summary> /// Determines whether the specified object instances are considered equal. /// </summary> /// <param name = "value1" /> /// <param name = "value2" /> /// <returns> /// <c>true</c> if <paramref name = "value1" /> is the same instance as <paramref name = "value2" /> or /// if both are <c>null</c> references or if <c>value1.Equals(value2)</c> returns <c>true</c>; otherwise, <c>false</c>.</returns> public static bool Equals(ref Half value1, ref Half value2) { return(value1.value == value2.value); }