Archived
1
This repository has been archived on 2022-08-08. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
mathpad/MathKit/MPElementaryFunctionTerm.h
Kim Wittenburg 7438fd1f95 Added Lots of Documentation
Added some nice to haves
Improved and Unified General Code Layout
2015-01-04 02:54:27 +01:00

71 lines
2.1 KiB
Objective-C

//
// MPFunctionValue.h
// MathPad
//
// Created by Kim Wittenburg on 11.10.14.
// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
//
#import "MPTerm.h"
/*!
@header
This file contains the <code>MPElementaryFunction</code> class.
*/
@class MPElementaryFunctionTerm;
/*!
@class MPElementaryFunctionTerm
@abstract A <code>MPElementaryFunction</code> implements various
mathematical functions that have a valid text representation.
*/
@interface MPElementaryFunctionTerm : MPTerm
/*!
@method initWithFunctionIdentifier:term:
@abstract Initializes a function term using the specified textual
representation of the function and a term as its value.
@param function
The textual representation of the function to use. Valid values
are <code>"sin"</code>, <code>"cos"</code>, <code>"tan"</code>,
<code>"asin"</code>, <code>"arcsin"</code>, <code>"acos"</code>,
<code>"arccos"</code>, <code>"atan"</code>,
<code>"arctan"</code>, <code>"log"</code>, <code>"lg"</code> and
<code>"ln"</code>.
@param term
The term that should be evaluated using <code>function</code>.
@return A new <code>MPElementaryFunctionTerm</code> instance.
*/
- (instancetype)initWithFunctionIdentifier:(NSString *)function
term:(MPTerm *)term; /* designated initializer */
/*!
@property functionIdentifier
@abstract The identifier of the receiver.
@discussion The identifier of a function is the string of letters it is
mathematically defined of (e.g. <code>"sin"</code> for the sine
function).
*/
@property (readonly, nonatomic, copy) NSString *functionIdentifier;
/*!
@property term
@abstract The receiver's term.
@discussion Depending on the actual function the value of the
<code>term</code> may be converted from radians into degrees.
*/
@property (readonly, nonatomic, strong) MPTerm *term;
@end