How to show square root symbol in image using gd library

I use php and gd library to draw a triangle. I can draw a triangle and add text to it (using imagettftext). But now I am facing a problem.

The two sides of the triangle are "x" and "x + 2". Thus, the hypotenuse will be equal to sqrt (x ^ 2 + (x + 2) ^ 2). But I don’t know how to show this equation using the correct mathematical (I mean using the square root symbol, etc.) in the image, using the gd functions as a hypotenuse label.

Is there any way to do this?

+3
source share
1 answer

, imagettftext, . ( Mac), Alt () + J.

0

Source: https://habr.com/ru/post/1749182/


All Articles