Area returns the area of the rectangle.
()
| 412 | |
| 413 | // Area returns the area of the rectangle. |
| 414 | func (r Rect) Area() float64 { |
| 415 | return (r.X1 - r.X0) * (r.Y1 - r.Y0) |
| 416 | } |
| 417 | |
| 418 | // Center returns the center point. |
| 419 | func (r Rect) Center() Point { |