Update curve.cpp