C# Class StdPaint.Triangle

Represents a set of three points.
Mostrar archivo Open project: TheBerkin/StdPaint Class Usage Examples

Public Properties

Property Type Description
A Point
B Point
C Point

Public Methods

Method Description
GetArea ( Point a, Point b, Point c ) : double

Returns the area of the triangle made from the specified points.

GetBounds ( ) : Rectangle

Returns a Rectangle that represents the bounding box of this Triangle.

Triangle ( Point a, Point b, Point c ) : System

Initializes a new instance of the Triangle struct with the supplied coordinates.

Method Details

GetArea() public static method

Returns the area of the triangle made from the specified points.
public static GetArea ( Point a, Point b, Point c ) : double
a Point The first point.
b Point The second point.
c Point The third point.
return double

GetBounds() public method

Returns a Rectangle that represents the bounding box of this Triangle.
public GetBounds ( ) : Rectangle
return Rectangle

Triangle() public method

Initializes a new instance of the Triangle struct with the supplied coordinates.
public Triangle ( Point a, Point b, Point c ) : System
a Point The first point.
b Point The second point.
c Point The third point.
return System

Property Details

A public_oe property

The first point in the triangle.
public Point A
return Point

B public_oe property

The second point in the triangle.
public Point B
return Point

C public_oe property

The third point in the triangle.
public Point C
return Point