# Class Lines.Algorithm

Various supported line-drawing algorithms.

**Namespace**: GoRogue

**Assembly**: GoRogue.dll

##### Syntax

`public sealed class Algorithm : Enum`

### Fields

#### Bresenham

Bresenham line algorithm.

##### Declaration

`public const Lines.Algorithm Bresenham`

##### Field Value

Type | Description |
---|---|

Lines.Algorithm |

#### BresenhamOrdered

Bresenham line algorithm, with the points guaranteed to be in start to finish order. This may be significantly slower than Bresenham, so if you really need ordering, considerDDA instead, as it is both faster than Bresenham and implicitly ordered.

##### Declaration

`public const Lines.Algorithm BresenhamOrdered`

##### Field Value

Type | Description |
---|---|

Lines.Algorithm |

#### DDA

DDA line algorithm -- effectively an optimized algorithm for producing Bresenham-like lines. There may be slight differences in appearance when compared to lines created with Bresenham, however this algorithm may also be measurably faster. Based on the algorithm here, as well as the Java library SquidLib's implementation. Points are guaranteed to be in order from start to finish.

##### Declaration

`public const Lines.Algorithm DDA`

##### Field Value

Type | Description |
---|---|

Lines.Algorithm |

#### Orthogonal

Line algorithm that takes only orthogonal steps (each grid location on the line returned is within one cardinal direction of the previous one). Potentially useful for LOS in games that use MANHATTAN distance. Based on the algorithm here.

##### Declaration

`public const Lines.Algorithm Orthogonal`

##### Field Value

Type | Description |
---|---|

Lines.Algorithm |

#### value__

##### Declaration

`public int value__`

##### Field Value

Type | Description |
---|---|

Int32 |