mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Implement calculations
This commit is contained in:
parent
884a146c1e
commit
f56846b342
1 changed files with 13 additions and 0 deletions
|
@ -38,6 +38,9 @@
|
|||
- (instancetype) init
|
||||
{
|
||||
self = [super init];
|
||||
if (self != nil)
|
||||
{
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -115,6 +118,16 @@
|
|||
{
|
||||
return _constant;
|
||||
}
|
||||
|
||||
- (double)baseUnitValueFromValue:(double)value
|
||||
{
|
||||
return ((_coefficient * value) + _constant);
|
||||
}
|
||||
|
||||
- (double)valueFromBaseUnitValue:(double)baseUnitValue
|
||||
{
|
||||
return ((baseUnitValue / _coefficient) - _constant);
|
||||
}
|
||||
@end
|
||||
|
||||
// Abstract unit...
|
||||
|
|
Loading…
Reference in a new issue