Math: converting coordinate system to other system -


i want convert map of 1200x1000 pixels iphone screen coordinates (480x360) can manipulation of user touches on screen. let´s got 'player' on map , @ location 1200x1000 want correspond location on iphone screen: 1200x1000 = 480x360. math functions can use complete this?

instead of hard coding map , touch locations, think better if can convert relative frame. i.e. @ location 1200x1000 , map 5000x5000, convert (1200/5000)% x (1000/5000)% , multiply screen size.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -