headers/libs/agg Fix PVS 11, PVS12

* Replace hard-coded math constants with M_SQRT1_2
	(math.h was already included)

	* also trailing whitespace removal

Change-Id: I5e9511060d2f812830f7621bee3aff9a517576e5
Reviewed-on: https://review.haiku-os.org/c/956
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Rob Gill
2019-01-29 04:02:25 +00:00
committed by waddlesplash
parent cf77ef1857
commit d1f885b435
+2 -2
View File
@@ -304,8 +304,8 @@ namespace agg
//------------------------------------------------------------------------ //------------------------------------------------------------------------
inline double trans_affine::scale() const inline double trans_affine::scale() const
{ {
double x = 0.707106781 * m0 + 0.707106781 * m2; double x = M_SQRT1_2 * m0 + M_SQRT1_2 * m2;
double y = 0.707106781 * m1 + 0.707106781 * m3; double y = M_SQRT1_2 * m1 + M_SQRT1_2 * m3;
return sqrt(x*x + y*y); return sqrt(x*x + y*y);
} }