Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Method A:
- Export float64 PrismGet( float64 Xpos , float64 Ypos , float64 Zpos ) {
- if ( BytePrism == nullptr ) { return -1.0; }
- uint32 Cell = ( ( uint32 ) ( ( ( PrismCell2d ) * Zpos ) + ( ByteBuffWidth * Ypos ) + Xpos ) );
- if ( Cell > 0 && Cell < PrismCell3d ) {
- return BytePrism[ Cell ];
- };
- return -1.0;
- };
- // Method B:
- Export float64 PrismGet( float64 Xpos , float64 Ypos , float64 Zpos , float64 Byte ) {
- if ( BytePrism == nullptr ) { return -1.0; }
- if ( Xpos < ByteBuffWidth && Ypos < ByteBuffHeight && Zpos < ByteBuffDepth && Xpos >= 0 && Ypos >= 0 && Zpos >= 0 ) {
- return BytePrism[ ( ( uint32 ) ( ( ( PrismCell2d ) * Zpos ) + ( ByteBuffWidth * Ypos ) + Xpos ) ) ];
- };
- return -1.0;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement