25 using System.Runtime.InteropServices;
26 using SiliconStudio.Core.Serialization;
28 namespace SiliconStudio.Core.Mathematics
33 [DataContract(
"Size2F")]
35 [StructLayout(LayoutKind.Sequential)]
36 public struct Size2F : IEquatable<Size2F>
46 public static readonly
Size2F Empty = Zero;
53 public Size2F(
float width,
float height)
80 return other.Width == Width && other.Height == Height;
84 public override bool Equals(
object obj)
86 if (ReferenceEquals(null, obj))
return false;
87 if (obj.GetType() != typeof(
Size2F))
return false;
88 return Equals((
Size2F)obj);
96 return (Width.GetHashCode() * 397) ^ Height.GetHashCode();
110 return left.Equals(right);
123 return !left.Equals(right);
128 return string.Format(
"({0},{1})", Width, Height);
Structure using the same layout than System.Drawing.SizeF.
override int GetHashCode()
bool Equals(Size2F other)
Determines whether the specified System.Object is equal to this instance.
override bool Equals(object obj)
override string ToString()
DataStyle
Specifies the style used for textual serialization when an array/list or a dictionary/map must be ser...
Size2F(float width, float height)
Initializes a new instance of the Size2F struct.