ZFSIN26KNM3DNHBUA67DKKHQYH62TZ627SNBHPO37IS3AB2XTHEQC
B2LNJNFTE27FCZUPR4YTVTFERSRYIUEF4L27NDAKNRPMAJY7KKNAC
P5O6MKCMZL3DK7ZO5SBWTCHOQB6O2MZA5VPSCQX6X4LJQVOWYV7AC
VUAVVMQEUYSXHBIUJHGRX237EZFT5MCB73ZKVWMGJDRHYZH4XZKAC
DTKCWM4J7PFNWAAES3RZHQGDA6PTDNX4TZVOXAKF5V7LCZBI3XUAC
HMDPEJRZK3PO6M5Z655Y4HWCUKC5I35GRMVVQOZYXWWCIH5ZWNPQC
CD5FF75KTOBTMVMTMCKMR6F5DFKOF26I5K43ITNHGBI3ZAZHA4RAC
HXTSBPAP75A7EC4RKWYQMVPPHPNZFPHUORBZWDHGEB6MPAGI7G7AC
foreach (var tuple in affected.Zip(Repeat<TResource, TUnit>(values), (transform, value) => (resource: transform.GetComponent<TResource>(), value))
var repeatedValues = Enumerable.Repeat(values.ToList(), int.MaxValue).SelectMany(value => value );
foreach (var tuple in affected.Zip(repeatedValues, (transform, value) => (resource: transform.GetComponent<TResource>(), value))
return (a.Count == 1) ? b.Zip(Repeat(a),(valB, valA) => Operator.Operate(valA, valB)) :
a.Zip(Repeat(b),(valA, valB) => Operator.Operate(valA, valB));
var (shortList, maybeLongList) = a.Count switch {
1 => (a, b),
_ => (b, a)
};
var repeatedShortList = Enumerable.Repeat(shortList, int.MaxValue).SelectMany((val) => val);
return maybeLongList.Zip(repeatedShortList, (x, y) => Operator.Operate(x, y));
private IEnumerable<double> Repeat(IEnumerable<double> values) {
while (true) {
foreach (var val in values) {
yield return val;
}
}
}