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

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

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

#import "PowerLaw.h"

const char PowerLaw_h_rcsid[] = POWERLAW_H_ID;
const char PowerLaw_m_rcsid[] = "$Id: PowerLaw.m,v 2.1 1993/10/28 18:30:31 rensing Exp $";

#include <math.h>

@implementation PowerLaw

static double power(double x, double binW, double *par )
{
    return binW * par[0] * pow(x,par[1]);
}

- init
{
    [super init];
    [[[self setTitle:"Power Law"] setFunctionPtr:power] setNumberArgs:2];
    [self registerFunc];
    [self setArgName:"Amplitude" at:0];
    [self setArgName:"Power" 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.