Calculate equations for straight lines based on points, and functions for mapping ranges | ScratchStats