Monado OpenXR Runtime
u_bitwise.h File Reference

Functions for manipulating tightly packed data as bits. More...

#include <stdint.h>
Include dependency graph for u_bitwise.h:

Go to the source code of this file.

Functions

int get_bit (const unsigned char *b, int num)
 
int get_bits (const unsigned char *b, int start, int num)
 
int sign_extend_13 (uint32_t i)
 Interpret the least-significant 13 bits as a signed 13-bit integer, and cast it to a signed int for normal usage. More...
 

Detailed Description

Functions for manipulating tightly packed data as bits.

Author
Jakob Bornecrantz jakob.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m
Pete Black pete..nosp@m.blac.nosp@m.k@col.nosp@m.labo.nosp@m.ra.co.nosp@m.m

Function Documentation

◆ sign_extend_13()

int sign_extend_13 ( uint32_t  i)

Interpret the least-significant 13 bits as a signed 13-bit integer, and cast it to a signed int for normal usage.