package Allegro.Fixed_Point_Math is
type Fixed is new Integer;
function itofix( x : Integer ) return Fixed;
function ftofix( x : Long_Float ) return Fixed;
function fixtoi( x : Fixed ) return Integer;
function fixtof( x : Fixed ) return Long_Float;
function fixceil( x : Fixed ) return Integer;
function fixfloor( x : Fixed ) return Integer;
function fixmul( x, y : Fixed ) return Fixed;
function fixdiv( x, y : Fixed ) return Fixed;
function fixadd( x, y : Fixed ) return Fixed;
function fixsub( x, y : Fixed ) return Fixed;
function fixsin( x : Fixed ) return Fixed;
function fixcos( x : Fixed ) return Fixed;
function fixtan( x : Fixed ) return Fixed;
function fixasin( x : Fixed ) return Fixed;
function fixacos( x : Fixed ) return Fixed;
function fixatan( x : Fixed ) return Fixed;
function fixatan2( y, x : Fixed ) return Fixed;
function fixsqrt( x : Fixed ) return Fixed;
function fixhypot( x, y : Fixed ) return Fixed;
function fixtorad_r return Fixed;
function radtofix_r return Fixed;
function To_Fixed( x : Integer ) return Fixed renames itofix;
function To_Fixed( x : Long_Float ) return Fixed renames ftofix;
function To_Integer( x : Fixed ) return Integer renames fixtoi;
function To_Long_Float( x : Fixed ) return Long_Float renames fixtof;
function Ceil( x : Fixed ) return Integer renames fixceil;
function Floor( x : Fixed ) return Integer renames fixfloor;
overriding
function "*"( x, y : Fixed ) return Fixed renames fixmul;
overriding
function "/"( x, y : Fixed ) return Fixed renames fixdiv;
overriding
function "+"( x, y : Fixed ) return Fixed renames fixadd;
overriding
function "-"( x, y : Fixed ) return Fixed renames fixsub;
function Sin( x : Fixed ) return Fixed renames fixsin;
function Cos( x : Fixed ) return Fixed renames fixcos;
function Tan( x : Fixed ) return Fixed renames fixtan;
function Asin( x : Fixed ) return Fixed renames fixasin;
function Acos( x : Fixed ) return Fixed renames fixacos;
function Atan( x : Fixed ) return Fixed renames fixatan;
function Atan2( y, x : Fixed ) return Fixed renames fixatan2;
function Sqrt( x : Fixed ) return Fixed renames fixsqrt;
function Hypot( x, y : Fixed ) return Fixed renames fixhypot;
private
pragma Import( C, itofix, "itofix" );
pragma Import( C, ftofix, "ftofix" );
pragma Import( C, fixtoi, "fixtoi" );
pragma Import( C, fixtof, "fixtof" );
pragma Import( C, fixceil, "fixceil" );
pragma Import( C, fixfloor, "fixfloor" );
pragma Import( C, fixmul, "fixmul" );
pragma Import( C, fixdiv, "fixdiv" );
pragma Import( C, fixadd, "fixadd" );
pragma Import( C, fixsub, "fixsub" );
pragma Import( C, fixsin, "fixsin" );
pragma Import( C, fixcos, "fixcos" );
pragma Import( C, fixtan, "fixtan" );
pragma Import( C, fixasin, "fixasin" );
pragma Import( C, fixacos, "fixacos" );
pragma Import( C, fixatan, "fixatan" );
pragma Import( C, fixatan2, "fixatan2" );
pragma Import( C, fixsqrt, "fixsqrt" );
pragma Import( C, fixhypot, "fixhypot" );
pragma Import( C, fixtorad_r, "get_fixtorad_r" );
pragma Import( C, radtofix_r, "get_radtofix_r" );
end Allegro.Fixed_Point_Math;