Class Offset
Inherited Members
Namespace: Unity.UIWidgets.ui
Syntax
public class Offset : OffsetBase, IEquatable<OffsetBase>, IEquatable<Offset>
Constructors
Offset(Single, Single)
Declaration
public Offset(float dx, float dy)
Parameters
Type | Name | Description |
---|---|---|
Single | dx | |
Single | dy |
Fields
infinite
Declaration
public static readonly Offset infinite
Field Value
Type | Description |
---|---|
Offset |
zero
Declaration
public static readonly Offset zero
Field Value
Type | Description |
---|---|
Offset |
Properties
distance
Declaration
public float distance { get; }
Property Value
Type | Description |
---|---|
Single |
distanceSquared
Declaration
public float distanceSquared { get; }
Property Value
Type | Description |
---|---|
Single |
dx
Declaration
public float dx { get; }
Property Value
Type | Description |
---|---|
Single |
dy
Declaration
public float dy { get; }
Property Value
Type | Description |
---|---|
Single |
Methods
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
Equals(Offset)
Declaration
public bool Equals(Offset other)
Parameters
Type | Name | Description |
---|---|---|
Offset | other |
Returns
Type | Description |
---|---|
Boolean |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
lerp(Offset, Offset, Single)
Declaration
public static Offset lerp(Offset a, Offset b, float t)
Parameters
Type | Name | Description |
---|---|---|
Offset | a | |
Offset | b | |
Single | t |
Returns
Type | Description |
---|---|
Offset |
scale(Single, Nullable<Single>)
Declaration
public Offset scale(float scaleX, float? scaleY = default(float? ))
Parameters
Type | Name | Description |
---|---|---|
Single | scaleX | |
Nullable<Single> | scaleY |
Returns
Type | Description |
---|---|
Offset |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
translate(Single, Single)
Declaration
public Offset translate(float translateX, float translateY)
Parameters
Type | Name | Description |
---|---|---|
Single | translateX | |
Single | translateY |
Returns
Type | Description |
---|---|
Offset |
Operators
Addition(Offset, Offset)
Declaration
public static Offset operator +(Offset a, Offset b)
Parameters
Type | Name | Description |
---|---|---|
Offset | a | |
Offset | b |
Returns
Type | Description |
---|---|
Offset |
BitwiseAnd(Offset, Size)
Declaration
public static Rect operator &(Offset a, Size other)
Parameters
Type | Name | Description |
---|---|---|
Offset | a | |
Size | other |
Returns
Type | Description |
---|---|
Rect |
Division(Offset, Single)
Declaration
public static Offset operator /(Offset a, float operand)
Parameters
Type | Name | Description |
---|---|---|
Offset | a | |
Single | operand |
Returns
Type | Description |
---|---|
Offset |
Equality(Offset, Offset)
Declaration
public static bool operator ==(Offset left, Offset right)
Parameters
Type | Name | Description |
---|---|---|
Offset | left | |
Offset | right |
Returns
Type | Description |
---|---|
Boolean |
Inequality(Offset, Offset)
Declaration
public static bool operator !=(Offset left, Offset right)
Parameters
Type | Name | Description |
---|---|---|
Offset | left | |
Offset | right |
Returns
Type | Description |
---|---|
Boolean |
Multiply(Offset, Single)
Declaration
public static Offset operator *(Offset a, float operand)
Parameters
Type | Name | Description |
---|---|---|
Offset | a | |
Single | operand |
Returns
Type | Description |
---|---|
Offset |
Subtraction(Offset, Offset)
Declaration
public static Offset operator -(Offset a, Offset b)
Parameters
Type | Name | Description |
---|---|---|
Offset | a | |
Offset | b |
Returns
Type | Description |
---|---|
Offset |
UnaryNegation(Offset)
Declaration
public static Offset operator -(Offset a)
Parameters
Type | Name | Description |
---|---|---|
Offset | a |
Returns
Type | Description |
---|---|
Offset |