Hybrid and Piecewise-Smooth Dynamical Systems