Search Unity

Small request for mathematics library

Discussion in 'Entity Component System' started by tertle, Mar 26, 2018.

  1. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    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