Faster tests
inline piecewiseDist