package mx // The type describes a simple // rectangle without transformations. type Size struct { // The upper left corner position point. Position Vector // Absolute width and height. // Both must be positive values. Width, Height Float } func (size Size) ContainsPoint(pt Vector) bool { return (size.Position.X < pt.X && (size.Position.X + size.Width) > pt.X ) && (size.Position.Y < pt.Y && (size.Position.Y + size.Height) > pt.Y ) } //type (s Size) ContainsPoint