That's not how movement works, it's done 5feet at a time with a 5 foot grid because the moving creature can't always know if something will cause a problem even if it's often (but not always) knowable before moving.
Did you not take geometry yet? 90 degrees is a right angle on the grid like...