// Set the value with range and time supplied void CInterpolatedValue::Init( float startValue, float endValue, float dt, InterpType_t type /*= INTERP_LINEAR*/ ) { if ( dt <= 0.0f ) { SetAbsolute( endValue ); return; } SetTime( gpGlobals->curtime, gpGlobals->curtime + dt ); SetRange( startValue, endValue ); SetType( type ); }
void FilePath::ConvertToAbsolute(const FilePath & basePath) { if (IsAbsolute()) { return; } if (!basePath.IsAbsolute()) { throw ILLEGAL_ARGUMENT_ERROR("FilePath::ConvertToAbsolute() - basePath is not absolute"); } FilePath tempFilePath(basePath); tempFilePath.Append(*this); std::swap(parts_, tempFilePath.parts_); SetAbsolute(); }