MCPcopy
hub / github.com/fogleman/ln / Contains

Method Contains

ln/sphere.go:28–30  ·  view source on GitHub ↗
(v Vector, f float64)

Source from the content-addressed store, hash-verified

26}
27
28func (s *Sphere) Contains(v Vector, f float64) bool {
29 return v.Sub(s.Center).Length() <= s.Radius+f
30}
31
32func (s *Sphere) Intersect(r Ray) Hit {
33 radius := s.Radius

Callers

nothing calls this directly

Calls 2

LengthMethod · 0.80
SubMethod · 0.80

Tested by

no test coverage detected