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

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

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

#import "LinearX.h"

const char LinearX_h_rcsid[] = LINEARX_H_ID;
const char LinearX_m_rcsid[] = "$Id: LinearX.m,v 1.1 1993/01/30 02:43:36 pfkeb Exp $";

@implementation LinearX 

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

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

- init
{
    [super init];
    [[[self setTitle:"LinearX"] setFunctionPtr:linearX] setNumberArgs:2];
    [self registerFunc];
    [self setArgName:"slope" at:0];
    [self setArgName:"xintercept" 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.