✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
When you click on the canvas of a WebGL application, window coordinates are returned. We need to convert these window coordinates to clip coordinates in the application. According to the following specification, what is the conversion equation for the x coordinate?
(0, h) --> (-1, -1)(w, 0) --> (1, 1)
xw, yw : Window coordinates x, y: Clip coordinates