MCPcopy Create free account
hub / github.com/cogentcore/core / ToPoint

Method ToPoint

math32/vector2.go:133–135  ·  view source on GitHub ↗

ToPoint returns the vector as an [image.Point].

()

Source from the content-addressed store, hash-verified

131
132// ToPoint returns the vector as an [image.Point].
133func (a Vector2) ToPoint() image.Point {
134 return image.Point{int(a.X), int(a.Y)}
135}
136
137// ToPointFloor returns the vector as an [image.Point] with all values [Floor]ed.
138func (a Vector2) ToPointFloor() image.Point {

Callers 10

TestVector2Function · 0.95
updatePlotMethod · 0.80
SizeFinalMethod · 0.80
offerCompleteMethod · 0.80
renderSVGMethod · 0.80
ScrollOffsetMethod · 0.80
RenderMethod · 0.80
offerCompleteMethod · 0.80
LookupMethod · 0.80
offerCorrectMethod · 0.80

Calls

no outgoing calls

Tested by 1

TestVector2Function · 0.76