mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 20:57:55 +00:00
Fix typos in interpolator README. #1240 [skip ci]
This commit is contained in:
parent
e9f58c32f8
commit
792e0bc48f
@ -117,7 +117,7 @@ In this situation we have two independent variables. Therefore we have two break
|
||||
#define HEIGHT_BP_SIZE 6
|
||||
|
||||
/* ---------------------------------------------------------------------------------*/
|
||||
/* NOTICE that we've coverted kg to lb, and m to inches in the breakpoint arrays. */
|
||||
/* NOTICE that we've converted kg to lb, and m to inches in the breakpoint arrays. */
|
||||
/* This just demonstrates a units conversion trick in breakpoint arrays. */
|
||||
/* ---------------------------------------------------------------------------------*/
|
||||
|
||||
@ -167,13 +167,13 @@ Trick::Interpolator* bmi_interpolator =
|
||||
```
|
||||
|
||||
### Using the Interpolator
|
||||
To use the interpolator, we simply call the **```eval()```** member function as follows, assuming that ```time``` and ```thrust``` are of type ```double```.
|
||||
To use the interpolator, we simply call the **```eval()```** member function as follows, assuming that ```bmi```, ```weight```, and ```height``` are of type ```double```.
|
||||
|
||||
```
|
||||
try {
|
||||
bmi = bmi_interpolator->eval( weight, height );
|
||||
} catch (std::logic_error e) {
|
||||
std::cerr << "Out of bounds." << std::endl;
|
||||
std::cerr << "Arguments beyond the limits of the BMI interpolation table." << std::endl;
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user