mirror of
https://github.com/pret/pmd-sky.git
synced 2026-07-24 12:30:35 -05:00
22 lines
349 B
C
22 lines
349 B
C
#include "number_util.h"
|
|
|
|
s32 CeilFixedPoint(struct fixed_point val_fp)
|
|
{
|
|
if (val_fp.integer == 0)
|
|
{
|
|
if (val_fp.fractional == 0)
|
|
{
|
|
return 0;
|
|
}
|
|
return 1;
|
|
}
|
|
else if (val_fp.fractional != 0)
|
|
{
|
|
return val_fp.integer + 1;
|
|
}
|
|
else
|
|
{
|
|
return val_fp.integer;
|
|
}
|
|
}
|