+static int is_linear(FloatAuto *prev, FloatAuto *next)
+{
+ if( !prev || !next ) return 1;
+ if( prev->curve_mode == FloatAuto::LINEAR ) return 1;
+ int64_t ipos = prev->get_control_in_position();
+ int64_t opos = prev->get_control_out_position();
+ if( !ipos && !opos ) return 1;
+ if( !ipos || !opos ) return 0;
+ float ival = prev->get_control_in_value();
+ float oval = prev->get_control_out_value();
+ float cval = prev->get_value(), nval = next->get_value();
+ if( !ival && !oval && EQUIV(cval, nval) ) return 1;
+ float ig = ival / ipos, og = oval / opos;
+ int64_t cpos = prev->position, npos = next->position;
+ float g = (nval - cval) / (npos - cpos);
+ if( EQUIV(ig, g) && EQUIV(og, g) ) return 1;
+ return 0;
+}