Archived
1

Reorganized File Structure

Added Documentation
This commit is contained in:
Kim Wittenburg
2014-12-12 00:39:30 +01:00
parent c367b1dbe8
commit 8f1f730358
90 changed files with 1270 additions and 1216 deletions

36
MathKit/MPVariable.m Normal file
View File

@@ -0,0 +1,36 @@
//
// MPVariable.m
// MathPad
//
// Created by Kim Wittenburg on 09.10.14.
// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
//
#import "MPVariable.h"
#import "MPParsedExpression.h"
#import "MPToken.h"
#import "MPExpression.h"
#import "MPEvaluationContext.h"
@implementation MPVariable
- (instancetype)initWithVariableName:(NSString *)variableName
{
self = [super init];
if (self) {
NSAssert(variableName != nil, @"variableName must not be nil.");
_variableName = variableName;
}
return self;
}
- (NSDecimalNumber *)doEvaluation:(NSError *__autoreleasing *)error
{
return [self valueForVariable:self.variableName
error:error];
}
@end