Table of Contents

Method FromDirection

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

FromDirection(double, double, bool)

Turns a direction into the angle the drawing counts for it, the reverse of ToDirection(double, double, bool), as AutoCAD's ANGTOS: from ANGBASE, clockwise where ANGDIR is 1, from nought up to a whole turn. With ANGBASE at north and ANGDIR clockwise, east is 90 degrees and north is nought.

public static double FromDirection(double direction, double angbase, bool clockwise)

Parameters

direction double

The direction, in radians counter-clockwise from east.

angbase double

ANGBASE: the direction of angle nought, in radians counter-clockwise from east.

clockwise bool

ANGDIR: whether angles grow clockwise.

Returns

double

The angle counted, in radians, from nought up to a whole turn.