Header menu logo Nu

Segment2 Type

Represents a 2D segment. Copied from - https://github.com/MonoGame/MonoGame/blob/v2.8/MonoGame.Framework/Ray.cs - and converted to Segment2.

Constructors

Constructor Description

Segment2(a, b)

Full Usage: Segment2(a, b)

Parameters:

Create a Segment2.

a : Vector2

The first point of the Segment2.

b : Vector2

The second point of the Segment2.

Instance members

Instance member Description

this.Equals

Full Usage: this.Equals

Parameters:
Returns: bool
true
if the specified Object is equal to this Segment2,
false
if it is not.
Modifiers: abstract

Check if the specified Object is equal to this Segment2.

obj : obj

The Object to test for equality with this Segment2.

Returns: bool

true
if the specified Object is equal to this Segment2,
false
if it is not.

this.Equals

Full Usage: this.Equals

Parameters:
Returns: bool
true
if the specified Segment2 is equal to this Segment2,
false
if it is not.
Modifiers: abstract

Check if the specified Segment2 is equal to this Segment2.

other : Segment2

The Segment2 to test for equality with this Segment2.

Returns: bool

true
if the specified Segment2 is equal to this Segment2,
false
if it is not.

this.GetHashCode

Full Usage: this.GetHashCode

Returns: int A hash code for this Segment2.
Modifiers: abstract

Get a hash code for this Segment2.

Returns: int

A hash code for this Segment2.

this.Length

Full Usage: this.Length

Returns: float32

The length of the segment.

Returns: float32

this.LengthSquared

Full Usage: this.LengthSquared

Returns: float32

The squared length of the segment.

Returns: float32

this.Normal

Full Usage: this.Normal

Returns: Vector2

The normal of the segment.

Returns: Vector2

this.ToString

Full Usage: this.ToString

Returns: string A String representation of this Segment2.
Modifiers: abstract

Get a String representation of this Segment2.

Returns: string

A String representation of this Segment2.

this.Transform

Full Usage: this.Transform

Parameters:
Returns: Segment2

Transform this Segment2 by a matrix.

m : Matrix4x4
Returns: Segment2

this.Vector

Full Usage: this.Vector

Returns: Vector2

The vector of the segment.

Returns: Vector2

Static members

Static member Description

a <> b

Full Usage: a <> b

Parameters:
    a : Segment2 - A segment to check for inequality.
    b : Segment2 - A segment to check for inequality.

Returns: bool
true
if the two segments are not equal,
false
if they are.

Check if two segments are not equal.

a : Segment2

A segment to check for inequality.

b : Segment2

A segment to check for inequality.

Returns: bool

true
if the two segments are not equal,
false
if they are.

a = b

Full Usage: a = b

Parameters:
    a : Segment2 - A segment to check for equality.
    b : Segment2 - A segment to check for equality.

Returns: bool
true
if the two segments are equals,
false
if they are not.

Check if two segments are equal.

a : Segment2

A segment to check for equality.

b : Segment2

A segment to check for equality.

Returns: bool

true
if the two segments are equals,
false
if they are not.

Type something to start searching.