Skip to content

Commit f220cae

Browse files
committed
Create Bitmap
1 parent 25f66f9 commit f220cae

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/Bitmap

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace Sokil;
4+
5+
class Bitmap
6+
{
7+
private $_bitmap;
8+
9+
public function __construct($bitmap = 0)
10+
{
11+
$this->_bitmap = (int) $bitmap;
12+
}
13+
14+
public function isSet($index)
15+
{
16+
return $this->_bitmap & (1 << $index);
17+
}
18+
}

0 commit comments

Comments
 (0)