40 lines
741 B
Objective-C
40 lines
741 B
Objective-C
//
|
|
// MPFractionFunction.m
|
|
// MathKit
|
|
//
|
|
// Created by Kim Wittenburg on 07.10.14.
|
|
// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
|
|
//
|
|
|
|
#import "MPFractionFunction.h"
|
|
|
|
#import "MPFractionTerm.h"
|
|
#import "MPExpression.h"
|
|
|
|
|
|
|
|
@implementation MPFractionFunction
|
|
|
|
MPFunctionAccessorImplementation(NominatorExpression, _nominatorExpression)
|
|
MPFunctionAccessorImplementation(DenominatorExpression, _denominatorExpression)
|
|
|
|
|
|
- (NSArray *)childrenAccessors
|
|
{
|
|
return @[@"nominatorExpression", @"denominatorExpression"];
|
|
}
|
|
|
|
|
|
- (Class)functionTermClass
|
|
{
|
|
return [MPFractionTerm class];
|
|
}
|
|
|
|
|
|
- (NSString *)description
|
|
{
|
|
return [NSString stringWithFormat:@"%@ / %@", self.nominatorExpression, self.denominatorExpression];
|
|
}
|
|
|
|
@end
|