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

Method SetPoint

math32/vector2.go:121–124  ·  view source on GitHub ↗

SetPoint sets the vector from the given [image.Point].

(pt image.Point)

Source from the content-addressed store, hash-verified

119
120// SetPoint sets the vector from the given [image.Point].
121func (a *Vector2) SetPoint(pt image.Point) {
122 a.X = float32(pt.X)
123 a.Y = float32(pt.Y)
124}
125
126// SetFixed sets the vector from the given [fixed.Point26_6].
127func (a *Vector2) SetFixed(pt fixed.Point26_6) {

Callers 3

Vector2FromPointFunction · 0.95
layoutSceneMethod · 0.80
EmbedImageFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected