public static void MoveVals(ref BoundedFloat src, ref BoundedFloat dest, float val) { if (val > src._val) { val = src._val; } if (dest._val + val > dest.max) { val = dest.max - dest._val; } dest._val += val; src._val -= val; }
public BoundedVector2(BoundedFloat bfx, BoundedFloat bfy) { this.bfx = bfx; this.bfy = bfy; }