Archived
1

Add Root Function and Product Function

This commit is contained in:
Kim Wittenburg
2017-08-31 00:04:21 +02:00
parent 43b907ba88
commit 3681e1416c
18 changed files with 864 additions and 0 deletions

39
MathKit/MPRootFunction.m Executable file
View File

@@ -0,0 +1,39 @@
//
// MPRootFunction.m
// MathPad
//
// Created by Kim Wittenburg on 11.01.15.
// Copyright (c) 2015 Kim Wittenburg. All rights reserved.
//
#import "MPRootFunction.h"
#import "MPRootTerm.h"
#import "MPExpression.h"
@implementation MPRootFunction
MPFunctionAccessorImplementation(ExponentExpression, _exponentExpression)
MPFunctionAccessorImplementation(RootExpression, _rootExpression)
- (NSArray *)childrenAccessors
{
return @[@"exponentExpression", @"rootExpression"];
}
- (Class)functionTermClass
{
return [MPRootTerm class];
}
- (NSString *)description
{
return [NSString stringWithFormat:@"Root(%@, %@)", self.exponentExpression, self.rootExpression];
}
@end