func pNorm(p fixed.Point26_6, length fixed.Int26_6) fixed.Point26_6 {
	d := pLen(p)
	if d == 0 {
		return fixed.Point26_6{}
	}
	s, t := int64(length), int64(d)
	x := int64(p.X) * s / t
	y := int64(p.Y) * s / t
	return fixed.Point26_6{fixed.Int26_6(x), fixed.Int26_6(y)}
}
pNorm returns the vector p normalized to the given length, or zero if p is
degenerate.
package raster
import (
	"fmt"
	"math"
	"golang.org/x/image/math/fixed"
)
func maxAbs(a, b fixed.Int26_6) fixed.Int26_6 {
	if a < 0 {
		a = -a
	}
	if b < 0 {
		b = -b
	}
	if a < b {
		return b
	}
	return a
}
func pNeg(p fixed.Point26_6) fixed.Point26_6 {
	return fixed.Point26_6{-p.X, -p.Y}
}
func pDot(p fixed.Point26_6, q fixed.Point26_6) fixed.Int52_12 {
	px, py := int64(p.X), int64(p.Y)
	qx, qy := int64(q.X), int64(q.Y)
	return fixed.Int52_12(px*qx + py*qy)
}
func pLen(p fixed.Point26_6) fixed.Int26_6 {
	x := float64(p.X)
	y := float64(p.Y)
	return fixed.Int26_6(math.Sqrt(x*x + y*y))
}