/// <summary> /// Sample at specific address. /// </summary> public T Sample([NotNull] SamplerBinder sampler, [NotNull] Floatx2 address, Integerx2 offset) { if (address.Generator != this.Generator || ((object)offset != null && offset.Generator != this.Generator) || sampler.Generator != this.Generator) { throw new ArgumentException("Mixing generators not allowed."); } SampleOperation op = new SampleOperation(); if ((object)offset != null) { op.BindInputs(sampler.Pin, pin, address.Pin, offset.Pin); } else { op.BindInputs(sampler.Pin, pin, address.Pin); } return((T)this.Generator.CreateFrom(op.Outputs[0])); }
/// <summary> /// Sample at specific address. /// </summary> public T Sample([NotNull] SamplerBinder sampler, [NotNull] Floatx3 address) { if (address.Generator != this.Generator || sampler.Generator != this.Generator) { throw new ArgumentException("Mixing generators not allowed."); } SampleOperation op = new SampleOperation(); op.BindInputs(sampler.Pin, pin, address.Pin); return((T)this.Generator.CreateFrom(op.Outputs[0])); }