private IntervalSampler(IntervalSampler other, double t, bool clone) { m_min = other.m_min; m_max = other.m_max; m_axis = other.m_axis; m_weightMult = other.m_weightMult; m_totalWeight = other.m_totalWeight; m_entries = new List <SamplingEntry>(other.m_entries); for (int i = 0; i < other.m_entries.Count; ++i) { m_entries[i] = new SamplingEntry(other.m_entries[i]); } Multiply(t); // If we are not cloning, we are splitting, so we have to multiply the remnant as well if (!clone) { other.Multiply(1.0 - t); } }
private IntervalSampler(IntervalSampler other, double t, bool clone) { m_min = other.m_min; m_max = other.m_max; m_axis = other.m_axis; m_weightMult = other.m_weightMult; m_totalWeight = other.m_totalWeight; m_entries = new List<SamplingEntry>(other.m_entries); for (int i = 0; i < other.m_entries.Count; ++i) { m_entries[i] = new SamplingEntry(other.m_entries[i]); } Multiply(t); // If we are not cloning, we are splitting, so we have to multiply the remnant as well if (!clone) { other.Multiply(1.0 - t); } }