geom/pointf32.go
Sander Schobers 8bcc0dff3f Added RectangleF32.
Added ZeroPtF32.
Added Center methods for rectangles.
2018-08-07 06:56:31 +02:00

15 lines
310 B
Go

package geom
// PointF32 is an X, Y coordinate pair (floating point, 32 bits).
type PointF32 struct {
X, Y float32
}
// ZeroPtF32 is initialized on (0, 0).
var ZeroPtF32 = PointF32{X: 0, Y: 0}
// PtF32 is a shorthand function to create a point.
func PtF32(x, y float32) PointF32 {
return PointF32{x, y}
}