NewFunction returns a Function that plots F using the default line style with 50 samples.
(f func(float64) float64)
| 27 | // NewFunction returns a Function that plots F using |
| 28 | // the default line style with 50 samples. |
| 29 | func NewFunction(f func(float64) float64) *Function { |
| 30 | return &Function{ |
| 31 | F: f, |
| 32 | Samples: 50, |
| 33 | LineStyle: DefaultLineStyle, |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | // Plot implements the Plotter interface, drawing a line |
| 38 | // that connects each point in the Line. |
no outgoing calls