Struct Position
Represents the position of an object in the world. A position consists of its x, y and z values in millimeters.
Implements
Namespace: Anki.Vector.Types
Assembly: Anki.Vector.dll
Syntax
public struct Position : IEquatable<Position>
Constructors
| Improve this Doc View SourcePosition(Single, Single, Single)
Initializes a new instance of the Position struct.
public Position(float x, float y, float z)
Parameters
Type | Name | Description |
---|---|---|
Single | x | The x position in millimeters. |
Single | y | The y position in millimeters. |
Single | z | The z position in millimeters. |
Properties
| Improve this Doc View SourceX
Gets the x position in millimeters
public float X { get; }
Property Type
Single |
Y
Gets the y position in millimeters
public float Y { get; }
Property Type
Single |
Z
Gets the z position in millimeters
public float Z { get; }
Property Type
Single |
Methods
| Improve this Doc View SourceEquals(Position)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Position other)
Parameters
Type | Name | Description |
---|---|---|
Position | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
Boolean | true if the current object is equal to the |
Equals(Object)
Determines whether the specified Object, is equal to this instance.
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The Object to compare with this instance. |
Returns
Type | Description |
---|---|
Boolean |
|
Overrides
| Improve this Doc View SourceGetHashCode()
Returns a hash code for this instance.
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
| Improve this Doc View SourceToString()
Converts to string.
public override string ToString()
Returns
Type | Description |
---|---|
String | A String that represents this instance. |
Overrides
Operators
| Improve this Doc View SourceEquality(Position, Position)
Implements the operator ==.
public static bool operator ==(Position lhs, Position rhs)
Parameters
Type | Name | Description |
---|---|---|
Position | lhs | The LHS. |
Position | rhs | The RHS. |
Returns
Type | Description |
---|---|
Boolean | The result of the operator. |
Inequality(Position, Position)
Implements the operator !=.
public static bool operator !=(Position lhs, Position rhs)
Parameters
Type | Name | Description |
---|---|---|
Position | lhs | The LHS. |
Position | rhs | The RHS. |
Returns
Type | Description |
---|---|
Boolean | The result of the operator. |