User Tools

Site Tools


prpl:pixeltocell

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
prpl:pixeltocell [2018/08/09 23:02] – [PIXELTOCELL] Added what type it returns and pixel:cell ratio for ease of use. blueboltprpl:pixeltocell [2018/08/12 03:28] – Title casing changed. GoodMorning
Line 1: Line 1:
 <- [[.:prplreference| PRPL reference]] <- [[.:prplreference#everything_else_2|Everything Else 2]] <- [[.:prplreference| PRPL reference]] <- [[.:prplreference#everything_else_2|Everything Else 2]]
  
-=====  PIXELTOCELL  =====+=====  PixelToCell  =====
  
 ^Arguments^Result^Notation^ ^Arguments^Result^Notation^
-| | | [ - ] |+PX PY X Y | [ float float float float ] |
  
  
Line 10: Line 10:
 Converts pixel coordinates to cell coordinates. Cell coordinates are returned as floats. Pixel:Cell ratio is 4:1 Converts pixel coordinates to cell coordinates. Cell coordinates are returned as floats. Pixel:Cell ratio is 4:1
 === Examples === === Examples ===
-<code> f2 = GetFloatFromStack(); //py  +<code> 
- f1 = GetFloatFromStack(); //px  +20 40 PixelToCell 
- stack.Push(new Data(x));  + 
- stack.Push(new Data(y)); +1 2 CellToPixel PixelToCell 
 + 
 +21.5 42.5 PixelToCell CellToPixel
    
 </code> </code>
  
prpl/pixeltocell.txt · Last modified: 2025/02/14 14:57 by 127.0.0.1