MCPcopy Create free account
hub / github.com/andrewreeman/SpectralSuite / findNearbyPoint

Method findNearbyPoint

shared/components/ControlPointComponent.cpp:185–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185juce::Point<int>* ControlPointComponent::findNearbyPoint(juce::Point<int> pointToCompare, int* out_nearestPointIndex = nullptr) {
186 for(int i=0; i<points.size(); ++i) {
187 auto p = &points.getReference(i);
188
189 if(POINTS_ARE_CLOSE(p, pointToCompare)) {
190 if(out_nearestPointIndex != nullptr) {
191 *out_nearestPointIndex = i;
192 }
193
194 return p;
195 }
196 }
197
198 return nullptr;
199}
200
201int ControlPointComponent::clipX(int newX, int pointIndex) {
202 if(pointIndex == 0) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected