OpenMusic Reference
linear-fun
linear-fun
(functions module) -- returns a function object for the linear function connecting the points represented by the input pairs
Syntax
linear-fun x0 y0 x1 y1
Inputs
name | data type(s) | comments |
---|---|---|
x0 | a number | defaults to 0 |
y0 | a number | defaults to 0 |
x1 | a number | defaults to 1 |
y1 | a number | defaults to 1 |
Output
output | data type(s) | comments |
---|---|---|
first | a function object |
Description
linear-fun takes the points (x0,y0) and (x1,y1) and solves for the linear equation y=ax+b. This is the equation of the line passing through both points. This function can be passed the samplefun , for example.
Prev | Home | Next |
---|---|---|
length | Up | list |