MCPcopy Index your code
hub / github.com/faiface/pixel / V

Function V

geometry.go:48–50  ·  view source on GitHub ↗

V returns a new 2D vector with the given coordinates.

(x, y float64)

Source from the content-addressed store, hash-verified

46
47// V returns a new 2D vector with the given coordinates.
48func V(x, y float64) Vec {
49 return Vec{x, y}
50}
51
52// nearlyEqual compares two float64s and returns whether they are equal, accounting for rounding errors.At worst, the
53// result is correct to 7 significant digits.

Callers 15

BenchmarkMatrixFunction · 0.92
TestRect_EdgesFunction · 0.92
TestRect_ResizeFunction · 0.92
TestRect_VerticesFunction · 0.92
TestMatrix_UnprojectFunction · 0.92
TestCircle_MovedFunction · 0.92
TestCircle_ResizedFunction · 0.92
TestCircle_ContainsFunction · 0.92
TestCircle_UnionFunction · 0.92
TestCircle_IntersectFunction · 0.92
TestRect_IntersectCircleFunction · 0.92

Calls

no outgoing calls

Tested by 15

BenchmarkMatrixFunction · 0.74
TestRect_EdgesFunction · 0.74
TestRect_ResizeFunction · 0.74
TestRect_VerticesFunction · 0.74
TestMatrix_UnprojectFunction · 0.74
TestCircle_MovedFunction · 0.74
TestCircle_ResizedFunction · 0.74
TestCircle_ContainsFunction · 0.74
TestCircle_UnionFunction · 0.74
TestCircle_IntersectFunction · 0.74
TestRect_IntersectCircleFunction · 0.74