Jonas Ådahl 5d83260b19 actor: Fix transforming stage point when scale is less than 1
The commit 6cd24faaa54de3246ca45d1c7426d8b7a74f71db (actor: Clean up
transform_stage_point()) changed the validation of the transformation
matrix to ignore the fraction part of the determinant. This caused
clutter_actor_transform_stage_point() to fail and return FALSE for
actors which scale was less than 1.

Previously the validation was ('det' being a float):
	det = (RQ[0][0] * ST[0][0])
	    + (RQ[0][1] * ST[0][1])
	    + (RQ[0][2] * ST[0][2]);
	if (!det)
		return FALSE;

Semantically, the if statement expression '!det' is equivalent to
'det == 0', i.e. 'det == 0.0f'. Post cleanup patches, 'det' was turned
into a double, and the if statement was changed to:

	if (CLUTTER_NEARBYINT (det) == 0)
		return FALSE;

which, different from before, rounds the determinant to the nearest
integer value, meaning determinant in the range (-0.5, 0.5) would be
considered invalid.

This patch reverts this part to the old behavior, while, because of the
inexact nature of floating point arithmetics, allowing a bit more liberal
meaning of "equals to 0" than '== 0.0'.

https://bugzilla.gnome.org/show_bug.cgi?id=754766
2015-09-11 10:36:52 +08:00
..
2015-08-01 21:55:07 +02:00
2015-07-20 13:05:06 +01:00
2014-03-17 23:07:58 +00:00
2014-03-17 23:07:58 +00:00
2014-03-17 23:07:58 +00:00
2014-03-17 23:07:58 +00:00
2014-03-17 19:26:49 +00:00
2014-03-17 23:07:58 +00:00
2014-03-17 23:07:58 +00:00
2015-01-01 15:16:40 +00:00
2014-03-17 23:07:58 +00:00
2015-06-10 12:28:59 +01:00
2014-03-17 23:07:58 +00:00
2015-05-26 19:05:20 +02:00
2014-03-17 23:07:58 +00:00
2015-03-03 17:44:15 +00:00
2014-03-17 23:07:58 +00:00
2014-03-17 18:53:27 +00:00
2014-03-17 23:07:58 +00:00
2015-07-22 19:12:42 +01:00