C# Class DivineRightGame.Managers.HelperObjects.Line

Represents a line in the map
显示文件 Open project: Haedrian/Divine-Right

Public Methods

Method Description
GetRoundedMidpoint ( ) : MapCoordinate

Gets the midpoint coordinate of this line. Rounded

Length ( ) : double

Returns the Euclidean lenght of the line. If any of the values are null, will throw an exception

Line ( ) : System
Line ( MapCoordinate start, MapCoordinate end ) : System
Line ( int startX, int startY, int endX, int endY ) : System

Creates a line on a 2D plane with specified x1y1 x2y2 coordinates

Method Details

GetRoundedMidpoint() public method

Gets the midpoint coordinate of this line. Rounded
public GetRoundedMidpoint ( ) : MapCoordinate
return MapCoordinate

Length() public method

Returns the Euclidean lenght of the line. If any of the values are null, will throw an exception
public Length ( ) : double
return double

Line() public method

public Line ( ) : System
return System

Line() public method

public Line ( MapCoordinate start, MapCoordinate end ) : System
start MapCoordinate
end MapCoordinate
return System

Line() public method

Creates a line on a 2D plane with specified x1y1 x2y2 coordinates
public Line ( int startX, int startY, int endX, int endY ) : System
startX int
startY int
endX int
endY int
return System