Etienne-Gautier commented on code in PR #162:
URL: https://github.com/apache/pdfbox/pull/162#discussion_r1179980026
##########
pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/PDFunction.java:
##########
@@ -348,6 +348,9 @@ else if (x > rangeMax)
*/
protected float interpolate(float x, float xRangeMin, float xRangeMax,
float yRangeMin, float yRangeMax)
{
+ if (xRangeMax == xRangeMin) {
Review Comment:
Alternatively, this change could apply only to type 3 functions if we
created an override of the `interpolate` function in `PDFunctionType3`.
But avoiding divisions by 0 for other function types sounded sensible to me
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]