Search Results for

    Show / Hide Table of Contents

    Struct Direction2D

    Represents a geometric 2D direction.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: TopSolid.Kernel.Automating
    Assembly: TopSolid.Kernel.Automating.dll
    Syntax
    [DataContract]
    [AvailableSinceVersion(7, 6, 0, 0)]
    public struct Direction2D
    Remarks

    The direction is defined by a unit vector, so (X * X + Y * Y) = 1.

    This structure is available since v7.6.

    Constructors

    Name Description
    Direction2D(double, double)

    Initializes a new instance of the Direction2D structure with its coordinates.

    Fields

    Name Description
    DX

    Positive X direction, i.e. (1,0).

    DY

    Positive Y direction, i.e. (0,1).

    X

    X component.

    Y

    Y component.

    Methods

    Name Description
    IsParallelTo(Direction2D, bool)

    Tells whether this direction is parallel to another direction.

    Operators

    Name Description
    operator /(Direction2D, double)

    Divides a direction by a double value.

    operator ^(Direction2D, Direction2D)

    Computes the cross product of two directions.

    implicit operator Vector2D(Direction2D)

    Casts a direction into a vector.

    operator *(double, Direction2D)

    Multiplies a double value with a direction.

    operator *(Direction2D, double)

    Multiplies a direction with a double value.

    operator *(Direction2D, Direction2D)

    Computes the dot product of two directions.

    operator -(Direction2D)

    Negates a direction.

    In this article
    Back to top
    • Term of use
    • Corporate information
    • Privacy Policy - GDPR

    Copyright ©2025 TopSolid - All rights reserved.