MCPcopy
hub / github.com/g3n/engine / NewVector2

Function NewVector2

math32/vector2.go:15–18  ·  view source on GitHub ↗

NewVector2 creates and returns a pointer to a new Vector2 with the specified x and y components

(x, y float32)

Source from the content-addressed store, hash-verified

13// NewVector2 creates and returns a pointer to a new Vector2 with
14// the specified x and y components
15func NewVector2(x, y float32) *Vector2 {
16
17 return &Vector2{X: x, Y: y}
18}
19
20// NewVec2 creates and returns a pointer to a new zero-ed Vector2.
21func NewVec2() *Vector2 {

Callers 6

NewDiskSectorFunction · 0.92
CenterMethod · 0.85
SizeMethod · 0.85
ClampPointMethod · 0.85
DistanceToPointMethod · 0.85
CloneMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected