GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  AL_FIXATAN2 (3)

NAME

al_fixatan2 - Allegro 5 API

CONTENTS

Synopsis
Description
Return Value

SYNOPSIS

C]
#include <allegro5/allegro.h>

al_fixed al_fixatan2(al_fixed y, al_fixed x) ]

DESCRIPTION

This is a fixed point version of the libc atan2() routine. It computes the arc tangent of C]y / x], but the signs of both arguments are used to determine the quadrant of the result, and C]x] is permitted to be zero. This function is useful to convert Cartesian coordinates to polar coordinates.

Example:
C]
    al_fixed result;

/* Sets ‘result[aq] to binary angle 64. */ result = al_fixatan2(al_itofix(1), 0);

/* Sets ‘result[aq] to binary angle -109. */ result = al_fixatan2(al_itofix(-1), al_itofix(-2));

/* Fails the assert. */ result = al_fixatan2(0, 0); assert(!al_get_errno()); ]

RETURN VALUE

Returns the arc tangent of C]y / x] in fixed point binary format angle, from -128 to 128. If both C]x] and C]y] are zero, returns zero and sets Allegro[aq]s errno to EDOM.

Search for    or go to Top of page |  Section 3 |  Main Index


Allegro reference manual AL_FIXATAN2 (3)

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.