clamp method

void clamp (Vector4 min, Vector4 max)

Clamp each entry n in this in the range [minn]-[maxn].

Implementation

void clamp(Vector4 min, Vector4 max) {
  final Float32List minStorage = min.storage;
  final Float32List maxStorage = max.storage;
  _v4storage[0] =
      _v4storage[0].clamp(minStorage[0], maxStorage[0]).toDouble();
  _v4storage[1] =
      _v4storage[1].clamp(minStorage[1], maxStorage[1]).toDouble();
  _v4storage[2] =
      _v4storage[2].clamp(minStorage[2], maxStorage[2]).toDouble();
  _v4storage[3] =
      _v4storage[3].clamp(minStorage[3], maxStorage[3]).toDouble();
}