Changes between Initial Version and Version 1 of Ticket #4825, comment 3
- Timestamp:
- May 1, 2020, 5:53:43 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #4825, comment 3
initial v1 1 1 Oh, but the function's names should be telling: 2 ```getHeight( vector2D)``` should return the height of the vertex with the given integer coordinates and raise for float arguments.2 ```getHeight(x, y)``` should return the height of the vertex with the given integer coordinates and raise for float arguments. 3 3 ```getExactHeight(vector2D)``` should return the calculated height at the floating coordinate. 4 4 ```getTileHeight(x, y)``` should return the height of the center of the tile with the given indices. … … 6 6 While ```getTileHeight(x, y)``` could just return ```getExactHeight(vector2D(x + 0.5, y + 0.5))``` IMO it's more relevant to be fast then precise and should rather return 7 7 {{{ 8 getHeight( vector2D(x, y))9 + getHeight( vector2D(x + 1, y))10 + getHeight( vector2D(x+1, y+1))11 + getHeight( vector2D(x, y+1))8 getHeight(x, y) 9 + getHeight(x + 1, y) 10 + getHeight(x+1, y+1) 11 + getHeight(x, y+1) 12 12 / 4 13 13 }}}