func Point(p0, p1, p2 *vec2.T, t float64) vec2.T {
	t1 := 1.0 - t
	f := t1 * t1
	result := p0.Scaled(f)
	f = 2.0 * t1 * t
	p1f := p1.Scaled(f)
	result.Add(&p1f)
	f = t * t
	p2f := p2.Scaled(f)
	result.Add(&p2f)
	return result
}
Point returns a point on a quadratic bezier spline at t (0,1).
package qbezier2
import (
	"fmt"
	"math"
	"github.com/ungerik/go3d/float64/vec2"
)
type T struct {
	P0, P1, P2 vec2.T
}
func Parse(s string) (r T, err error) {
	_, err = fmt.Sscan(s,
		&r.P0[0], &r.P0[1],
		&r.P1[0], &r.P1[1],
		&r.P2[0], &r.P2[1],
	)
	return r, err
}
func (bez *T) String() string {
	return fmt.Sprintf("%s %s %s",
		bez.P0.String(), bez.P1.String(), bez.P2.String(),
	)
}
func (bez *T) Point(t float64) vec2.T {
	return Point(&bez.P0, &bez.P1, &bez.P2, t)
}
func (bez *T) Tangent(t float64) vec2.T {
	return Tangent(&bez.P0, &bez.P1, &bez.P2, t)
}
func (bez *T) Length(t float64) float64 {
	return Length(&bez.P0, &bez.P1, &bez.P2, t)
}