Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Small request for mathematics library

Discussion in 'Data Oriented Technology Stack' started by tertle, Mar 26, 2018.

  1. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    1,709
    Not certain this is the right place and I only had a quick look but couldn't see anywhere to do a pull request.
    Could we get % operator added to int2, int3, etc

    [MethodImpl((MethodImplOptions) 256)]
    public static int2 operator %(int2 lhs, int rhs)
    {
    return new int2(lhs.x % rhs, lhs.y % rhs);
    }

    Very minor but convenient.
     
  2. z00n

    z00n

    Joined:
    Nov 24, 2009
    Posts:
    44