示例#1
0
文件: UDim.cs 项目: Elmuti/Orakel.NET
 /// <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)
                ));
 }
示例#2
0
 /// <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;
 }
示例#3
0
 /// <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);
 }