Skip to main content

Module core

Module core 

Source

Structs§

Version
Version numbering scheme. See https://semver.org/

Constants§

HASH_INIT
Initial value for the djb2 hash. (base.h: B2_HASH_INIT)
NULL_INDEX
Used to indicate an unset or invalid index value. (base.h: B2_NULL_INDEX)
SECRET_COOKIE
Use to validate definitions. (core.h: B2_SECRET_COOKIE)

Functions§

bounding_power_of2
(ctz.h: b2BoundingPowerOf2)
clz32
Count leading zeros of a 32-bit value. (ctz.h: b2CLZ32)
ctz32
Count trailing zeros of a 32-bit block. (ctz.h: b2CTZ32)
ctz64
Count trailing zeros of a 64-bit block. (ctz.h: b2CTZ64)
get_length_units_per_meter
Get the current length units per meter.
get_version
Get the current version of Box2D.
hash
Simple djb2 hash function for determinism testing. (timer.c)
is_double_precision
@return true if the library was built with the double-precision feature (large world mode), mirroring BOX2D_DOUBLE_PRECISION.
is_power_of2
(ctz.h: b2IsPowerOf2)
pop_count64
Population count of a 64-bit block. (ctz.h: b2PopCount64)
round_up_power_of2
(ctz.h: b2RoundUpPowerOf2)
set_length_units_per_meter
Box2D bases all length units on meters. Set this to use different units for all length values passed to and returned from Box2D. Must be set at application startup, before any other Box2D calls.