Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType
Commits:
-
c5cd2a3d
by Alexei Podtelezhnikov at 2021-11-10T08:46:26-05:00
1 changed file:
Changes:
... | ... | @@ -1883,19 +1883,16 @@ |
1883 | 1883 |
" clamping\n",
|
1884 | 1884 |
a->minimum / 65536.0,
|
1885 | 1885 |
a->maximum / 65536.0 ));
|
1886 |
- |
|
1887 |
- if ( coord > a->maximum )
|
|
1888 |
- coord = a->maximum;
|
|
1889 |
- else
|
|
1890 |
- coord = a->minimum;
|
|
1891 | 1886 |
}
|
1892 | 1887 |
|
1893 |
- if ( coord < a->def )
|
|
1894 |
- normalized[i] = -FT_DivFix( SUB_LONG( coord, a->def ),
|
|
1895 |
- SUB_LONG( a->minimum, a->def ) );
|
|
1896 |
- else if ( coord > a->def )
|
|
1897 |
- normalized[i] = FT_DivFix( SUB_LONG( coord, a->def ),
|
|
1888 |
+ if ( coord > a->def )
|
|
1889 |
+ normalized[i] = coord >= a->maximum ? 0x10000L :
|
|
1890 |
+ FT_DivFix( SUB_LONG( coord, a->def ),
|
|
1898 | 1891 |
SUB_LONG( a->maximum, a->def ) );
|
1892 |
+ else if ( coord < a->def )
|
|
1893 |
+ normalized[i] = coord <= a->minimum ? -0x10000L :
|
|
1894 |
+ FT_DivFix( SUB_LONG( coord, a->def ),
|
|
1895 |
+ SUB_LONG( a->def, a->minimum ) );
|
|
1899 | 1896 |
else
|
1900 | 1897 |
normalized[i] = 0;
|
1901 | 1898 |
}
|