示例#1
0
 public void SetPerpenticularTo(Int2 r_)
 {
     //unity coordinate system default
     x = -r_.y;
     y = r_.x;
 }
示例#2
0
 public static Int2 LerpClamp(Int2 a_, Int2 b_, N2 p_, N2 t_) => Lerp(a_, b_, GenericMath.Clamp(p_, 0, t_), t_);
示例#3
0
 public static N2 Dot(Int2 a_, Int2 b_)
 {
     checked {
         return((N2)a_.x * b_.x + (N2)a_.y * b_.y);
     }
 }
示例#4
0
 public static Int2 Lerp(Int2 a_, Int2 b_, N2 p_, N2 t_) => a_ + Scale(b_ - a_, p_, t_);