(v Vector, eps float64)
| 27 | } |
| 28 | |
| 29 | func (f *Function) Contains(v Vector, eps float64) bool { |
| 30 | if f.Direction == Below { |
| 31 | return v.Z < f.Function(v.X, v.Y) |
| 32 | } else { |
| 33 | return v.Z > f.Function(v.X, v.Y) |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | func (f *Function) Intersect(ray Ray) Hit { |
| 38 | step := 1.0 / 64 |