IsBetween() public method

public IsBetween ( int value ) : bool
value int
return bool
Ejemplo n.º 1
0
		public void TestIntersection()
		{
			Range<int> one = new Range<int>(0, 10);
			Range<int> two = new Range<int>(2, 5);

			Assert.IsTrue(one.IntersectsWith(two));
			Assert.IsTrue(one.IsBetween(2));
			Assert.IsFalse(one.IsBetween(12));
		}
Ejemplo n.º 2
0
        public void TestIntersection()
        {
            Range <int> one = new Range <int>(0, 10);
            Range <int> two = new Range <int>(2, 5);

            Assert.IsTrue(one.IntersectsWith(two));
            Assert.IsTrue(one.IsBetween(2));
            Assert.IsFalse(one.IsBetween(12));
        }
Ejemplo n.º 3
0
		internal Instrument(Range<byte> key, Range<byte> vel, IAudioSource src, double pan = 0)
		{
			if (key == null)
				throw new ArgumentNullException(nameof(key));
			if (vel == null)
				throw new ArgumentNullException(nameof(vel));
			if (!key.IsBetween(0, 127))
				throw new ArgumentOutOfRangeException(nameof(key));
			if (!vel.IsBetween(0, 127))
				throw new ArgumentOutOfRangeException(nameof(vel));
			if (src == null)
				throw new ArgumentNullException(nameof(src));
			KeyRange = key;
			VelocityRange = vel;
			Source = src;
			Pan = pan;
		}