diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2014-12-04 16:05:42 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2014-12-08 13:35:27 (GMT) |
commit | b6c0fbcbb224c894eb90cc920c6ecb8e8d48e66a (patch) | |
tree | 945db6cb55f72e09c56e2846eaa355f8c6bc472d /src/compression/fixpoint.c | |
parent | db972bad9178b95ee16110de186074476579bf89 (diff) |
Made function arguments const where relevant.
Change-Id: I5b196b57976c8c718b079336a805188ccb03ef4b
Diffstat (limited to 'src/compression/fixpoint.c')
-rw-r--r-- | src/compression/fixpoint.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compression/fixpoint.c b/src/compression/fixpoint.c index 17fe6e8..f769a43 100644 --- a/src/compression/fixpoint.c +++ b/src/compression/fixpoint.c @@ -19,7 +19,7 @@ /* Conversion routines from / to double precision */ /* Positive double to 32 bit fixed point value */ -fix_t Ptngc_ud_to_fix_t(double d,double max) +fix_t Ptngc_ud_to_fix_t(double d, const double max) { fix_t val; if (d<0.) @@ -33,7 +33,7 @@ fix_t Ptngc_ud_to_fix_t(double d,double max) } /* double to signed 32 bit fixed point value */ -fix_t Ptngc_d_to_fix_t(double d,double max) +fix_t Ptngc_d_to_fix_t(double d, const double max) { fix_t val; int sign=0; @@ -54,13 +54,13 @@ fix_t Ptngc_d_to_fix_t(double d,double max) /* 32 bit fixed point value to positive double */ -double Ptngc_fix_t_to_ud(fix_t f, double max) +double Ptngc_fix_t_to_ud(fix_t f, const double max) { return (double)f*(max/MAX32BIT); } /* signed 32 bit fixed point value to double */ -double Ptngc_fix_t_to_d(fix_t f, double max) +double Ptngc_fix_t_to_d(fix_t f, const double max) { int sign=0; double d; |