MCPcopy Create free account
hub / github.com/egonelbre/exp / ScaleTo

Function ScaleTo

pixel/flowers/math.go:26–29  ·  view source on GitHub ↗
(a pixel.Vec, r float64)

Source from the content-addressed store, hash-verified

24}
25
26func ScaleTo(a pixel.Vec, r float64) pixel.Vec {
27 x := a.Len()
28 return a.Scaled(r / x)
29}

Callers 1

LineFunction · 0.70

Calls 1

LenMethod · 0.45

Tested by

no test coverage detected