Advertisement
FatalSleep

Untitled

Aug 19th, 2014
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. // Method A:
  2. Export float64 PrismGet( float64 Xpos , float64 Ypos , float64 Zpos ) {
  3. if ( BytePrism == nullptr ) { return -1.0; }
  4. uint32 Cell = ( ( uint32 ) ( ( ( PrismCell2d ) * Zpos ) + ( ByteBuffWidth * Ypos ) + Xpos ) );
  5.  
  6. if ( Cell > 0 && Cell < PrismCell3d ) {
  7. return BytePrism[ Cell ];
  8. };
  9.  
  10. return -1.0;
  11. };
  12.  
  13. // Method B:
  14. Export float64 PrismGet( float64 Xpos , float64 Ypos , float64 Zpos , float64 Byte ) {
  15. if ( BytePrism == nullptr ) { return -1.0; }
  16. if ( Xpos < ByteBuffWidth && Ypos < ByteBuffHeight && Zpos < ByteBuffDepth && Xpos >= 0 && Ypos >= 0 && Zpos >= 0 ) {
  17. return BytePrism[ ( ( uint32 ) ( ( ( PrismCell2d ) * Zpos ) + ( ByteBuffWidth * Ypos ) + Xpos ) ) ];
  18. };
  19.  
  20. return -1.0;
  21. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement