Beispiel #1
0
 /// <summary>
 /// this * alpha
 /// </summary>
 /// <param name="alpha"></param>
 /// <returns></returns>
 public Vec4w Multiply(double alpha) => new Vec4w(
     SaturateCast.ToUInt16(Item0 * alpha),
     SaturateCast.ToUInt16(Item1 * alpha),
     SaturateCast.ToUInt16(Item2 * alpha),
     SaturateCast.ToUInt16(Item3 * alpha));
Beispiel #2
0
 /// <summary>
 /// this + other
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public Vec4w Add(Vec4w other) => new Vec4w(
     SaturateCast.ToUInt16(Item0 + other.Item0),
     SaturateCast.ToUInt16(Item1 + other.Item1),
     SaturateCast.ToUInt16(Item2 + other.Item2),
     SaturateCast.ToUInt16(Item3 + other.Item3));
Beispiel #3
0
 /// <summary>
 /// this - other
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public Vec4w Subtract(Vec4w other) => new Vec4w(
     SaturateCast.ToUInt16(Item0 - other.Item0),
     SaturateCast.ToUInt16(Item1 - other.Item1),
     SaturateCast.ToUInt16(Item2 - other.Item2),
     SaturateCast.ToUInt16(Item3 - other.Item3));
Beispiel #4
0
 /// <summary>
 /// this / alpha
 /// </summary>
 /// <param name="alpha"></param>
 /// <returns></returns>
 public Vec2s Divide(double alpha) => new Vec2s(
     SaturateCast.ToInt16(Item0 / alpha),
     SaturateCast.ToInt16(Item1 / alpha));
Beispiel #5
0
 /// <summary>
 /// this / alpha
 /// </summary>
 /// <param name="alpha"></param>
 /// <returns></returns>
 public Vec4w Divide(double alpha) => new Vec4w(
     SaturateCast.ToUInt16(Item0 / alpha),
     SaturateCast.ToUInt16(Item1 / alpha),
     SaturateCast.ToUInt16(Item2 / alpha),
     SaturateCast.ToUInt16(Item3 / alpha));
Beispiel #6
0
 /// <summary>
 /// this * alpha
 /// </summary>
 /// <param name="alpha"></param>
 /// <returns></returns>
 public Vec2s Multiply(double alpha) => new Vec2s(
     SaturateCast.ToInt16(Item0 * alpha),
     SaturateCast.ToInt16(Item1 * alpha));
Beispiel #7
0
 /// <summary>
 /// this - other
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public Vec2s Subtract(Vec2s other) => new Vec2s(
     SaturateCast.ToInt16(Item0 - other.Item0),
     SaturateCast.ToInt16(Item1 - other.Item1));
Beispiel #8
0
 /// <summary>
 /// this + other
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public Vec2s Add(Vec2s other) => new Vec2s(
     SaturateCast.ToInt16(Item0 + other.Item0),
     SaturateCast.ToInt16(Item1 + other.Item1));
Beispiel #9
0
 /// <summary>
 /// this - other
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public Vec2w Subtract(Vec2w other) => new Vec2w(
     SaturateCast.ToUInt16(Item0 - other.Item0),
     SaturateCast.ToUInt16(Item1 - other.Item1));
Beispiel #10
0
 /// <summary>
 /// this + other
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public Vec2w Add(Vec2w other) => new Vec2w(
     SaturateCast.ToUInt16(Item0 + other.Item0),
     SaturateCast.ToUInt16(Item1 + other.Item1));