initialPrefabs logo
  • Home 
  • Blog 
  • Tools 
  • Tags 
  1. Home
  2. Tools
  3. No Alloc Collections Documentation
  4. NoAllocBitArray

NoAllocBitArray

1 min read • 92 words
Tools   API  
Tools   API  
Share via
initialPrefabs
Link copied to clipboard

On this page
  • namespace InitialPrefabs.Collections
  • Summary
  • int CalculateSize(int totalBools)
    • Summary
    • Param
    • Returns
  • NoAllocBitArrayEnumerator GetEnumerator()

NoAllocBitArray  

namespace InitialPrefabs.Collections  

Summary  

A stack only bitarray treats each bit as a boolean per byte. This means that each byte can store 8 booleans.

int CalculateSize(int totalBools)  

Summary  

Calculates the total number of bytes the NoAllocBitArray can store. For example if you want to store 8 booleans, we will only need 1 byte.

Param  

Parameter Description
totalBools The total number of booleans to store.

Returns  

int - An integer to the nearest total number of bytes.

NoAllocBitArrayEnumerator GetEnumerator()  

Go back to API Home

 MathUtils
NoAllocBitArrayEnumerator 
On this page:
  • namespace InitialPrefabs.Collections
  • Summary
  • int CalculateSize(int totalBools)
    • Summary
    • Param
    • Returns
  • NoAllocBitArrayEnumerator GetEnumerator()
Follow Us!

Contact us if you want to work with us for your games and art projects!

     
Copyright © 2016-2025 InitialPrefabs
initialPrefabs
Code copied to clipboard