Issue was caused by precision errors with floats. Made internal grid drawing stuff using doubles and also added some functions to multiply double vector by float matrix which also makes all intermediate calculation in doubles.
Issue was caused by precision errors with floats. Made internal grid drawing stuff using doubles and also added some functions to multiply double vector by float matrix which also makes all intermediate calculation in doubles.