Pregunta

I've been using SDL for input on ios but whenever I get the finger's coordinates from the event structure they are normalized. Now I'm wondering how I change these normalized coordinates to device space so I can use?

Examples of how they look normalized: 2.8026e-45

¿Fue útil?

Solución

"Normalized", in this instance, simply means "between 0 and 1". That is a really, really unusually small number to be getting out of the structure, regardless of the units, and suggests that the data is either uninitialized, or being interpreted using the wrong typecasting (if you reinterpreted the bits of the integer 2 as a float32, you would get that value).

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top