/* LinearY.m  	by Paul Kunz	January 1993
 * Subclass of PFunction to manage a LinearY function
 *
 * Copyright (C)  1993  The Board of Trustees of
 * The Leland Stanford Junior University. All Rights Reserved.
 */

#import "LinearY.h"

const char LinearY_h_rcsid[] = LINEARY_H_ID;
const char LinearY_m_rcsid[] = "$Id: LinearY.m,v 1.2 1993/02/10 18:17:55 rensing Exp $";

@implementation LinearY 

static double linearY(double x, double binW, double *par )
{
    double result;

    result = binW * (par[0]  + par[1]*x);
    return result;
}

- init
{
    [super init];
    [[[self setTitle:"LinearY"] setFunctionPtr:linearY] setNumberArgs:2];
    [self registerFunc];
    [self setArgName:"yintercept" at:0];
    [self setArgName:"slope" at:1];
    return self;
}

@end
