InRect:
Filter:
Classes | UGens > Maths

InRect : UGen : AbstractFunction : Object

Test if a point is within a given rectangle.
Source: Trig.sc

Description

A pair of signals x and y are treated as a point (x,y) in 2-D; if they fall within the bounds of the rectangle, then this UGen outputs a one; else it outputs zero.

Class Methods

InRect.ar(x: 0.0, y: 0.0, rect)

InRect.kr(x: 0.0, y: 0.0, rect)

Arguments:

x

X component signal

y

Y component signal

rect

A Rect which defines the rectangular region to monitor; note that Rects are in screen co-ordinates, so the top is smaller than the bottom. The Rect is created once and cannot be modulated.

Inherited class methods

Instance Methods

Inherited instance methods

Examples