ftp.nice.ch/pub/next/science/mathematics/HippoDraw.2.0.s.tar.gz#/HippoDraw/Hippo.bproj/LinearY.m

This is LinearY.m in view mode; [Download] [Up]

/* 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

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.