Math-Get perpendicular to slope

From Vectorlab
Jump to: navigation, search


Returns the perpendicular to the slope between two vectors. You need to load the routine M_CheckAng360 before this. By Orso B. Schmid


{ Orso ***************************** }
{ returns the slope between two points, useful for a line }
{ this was called "M_GetAngleBetwPoints" before }
FUNCTION M_GetPerpToSlope(v1, v2: VECTOR): REAL;
	BEGIN
		M_GetPerpToSlope := M_CheckAng360(M_GetSlope(v1, v2) + 90);
	END;