32b Fixedpoint Library
C
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
F16.h
F16LUT.h
F16vl.h
README.md

README.md

#F16# F16 is an 16.16 Fixed-Point library focusing on speed and to be used on the Dingoo-A320.

#Features#

  • Type Conversion
  • Basic Arithmetics
  • Comparison & Clamp Functions
  • sin, cos Look-up Tables

#Usage & Notes# F16's Functions are designed to always return an F16 value and taking the arguments in func(Dst, Src) Order.

float:

float d = a+b*c

Fixpoint:

F16 d = F16_ADD(a, F16_MUL(b, c) )

Trigonometry

The resolution of the sin/cos LUT is 65536 elements. The functions do not checked for indexing validity for the sake of speed.

Comparison

Return values: F16_CMP

  •  `-1 if f1 > f2 `
    
  •  ` 0 if f1 == f2`
    
  •  ` 1 if f1 < f2`
    

#License# GPLv3