Search Issue Tracker
Fixed in 2019.3.X
Votes
3
Found in
2017.2.0f3
Issue ID
959093
Regression
No
Vector2Int is missing negation, division and multiplication by int operators
Steps to reproduce:
1. Use one of these in a C# script:
var vector = 2 * Vector2Int.one;
var vector = -Vector2Int.right;
var vector = new Vector2Int(1, 1) / 1;
Actual result: all of these lines produce compile errors because Vector2Int is missing negation, division and multiplication by int operators
Reproducible with: 2017.2.0f3, 2017.3.0b5
Comments (1)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Assigned font's bold/font-weight styles render using Default Font's assets when Default Font has corresponding style assets defined in TMP Settings
- "Modifying the parent of a VisualElement while it’s already being modified is not allowed" error is thrown when entering text and pressing tab in the Search window
- Mesh colliders are not updating their positions of bounds correctly
- Images are missing from the "Open the sprite editor" documentation for 6.0, 6.1 and 6.2
- The previous element in the array is modified when assigning an Asset to a new element of AssetReferenceT
ArConstructor
Jan 06, 2018 21:34
This also affects Vector3Int.
Vector2, Vector3, Vector4 have these operators:
vector +(vector a, vector b)
vector /(vector a, float d)
bool ==(vector lhs, vector rhs)
bool !=(vector lhs, vector rhs)
vector *(vector a, float d)
vector *(float d, vector a)
vector -(vector a, vector b)
vector -(vector a)
But Vector2Int, Vector3Int have only these operators:
vector +(vector a, vector b)
bool ==(vector lhs, vector rhs)
bool !=(vector lhs, vector rhs)
vector *(vector a, vector b)
vector *(vector a, int b)
vector -(vector a, vector b)