Based on some example code, cross fade now works with good math