For a NURBS curve, the order is just the degree plus one. So just pass around the degree instead of always subtracting one.