/// <summary> /// Returns a UDim interpolated between this, and the goal. /// </summary> /// <param name="goal"></param> /// <param name="alpha"></param> /// <returns></returns> public UDim Lerp(UDim goal, float alpha) { return(new UDim( Scale + (goal.Scale - Scale) * alpha, (int)((Offset + (goal.Offset - Offset)) * alpha) )); }
/// <summary> /// Creates a new UDim2, using two UDim coordinates. /// </summary> /// <param name="xDim"></param> /// <param name="yDim"></param> public UDim2(UDim xDim, UDim yDim) { X = xDim; Y = yDim; }
/// <summary> /// Creates a new UDim2, using two pairs of UDim coordinates. /// </summary> /// <param name="xScale"></param> /// <param name="xOffset"></param> /// <param name="yScale"></param> /// <param name="yOffset"></param> public UDim2(float xScale, int xOffset, float yScale, int yOffset) { X = new UDim(xScale, xOffset); Y = new UDim(yScale, yOffset); }