# 3.5.1.2.8 Angleint1

## Description

This function return the angle between a line which through two points (px1, py1) and (px2, py2) and the X axis.

## Syntax

double Angleint1(double px1, double py1, double px2, double py2 [, int unit, int direction])

## Parameters

px1 (double)

The X-coordinate of the first point.

py1 (double)

The Y-coordinate of the first point.

px2 (double)

The X-coordinate of the second point.

py2 (double)

The Y-coordinate of the second point.

unit (int)

Specify the unit of return value. 0 indicates radians and 1 indicates degrees. The default setting is radians.

direction (int)

Specify the direction of the return value. 0 constrains the value to the first (+x,+y) and fourth (+x,-y) quadrant. 1 returns values from 0 to 2PI radians or 0 to 360 degrees.

## Return

Returns an angle as a double value in units of radians or degrees.

## Example

double ff=angleint1(1,1,3,3,1);
ff=; //Should return 45.