Changeset 593 for trunk


Ignore:
Timestamp:
Feb 25, 2007, 9:29:26 PM (18 years ago)
Author:
dkearney
Message:

added miles as units understood by rappture

Location:
trunk/src/core
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/RpUnits.cc

    r568 r593  
    26092609    RpUnits* feet       = NULL;
    26102610    RpUnits* yard       = NULL;
     2611    RpUnits* mile       = NULL;
    26112612
    26122613    meters     = RpUnits::define("m", NULL, RP_TYPE_LENGTH, RPUNITS_METRIC);
     
    26152616    feet       = RpUnits::define("ft", inch, RP_TYPE_LENGTH);
    26162617    yard       = RpUnits::define("yd", inch, RP_TYPE_LENGTH);
     2618    mile       = RpUnits::define("mi", inch, RP_TYPE_LENGTH);
    26172619
    26182620    // RpUnits::makeMetric(meters);
     
    26232625    RpUnits::define(inch, yard, inch2yard, yard2inch);
    26242626    RpUnits::define(inch, meters, inch2meter, meter2inch);
     2627    RpUnits::define(inch, mile, inch2mile, mile2inch);
    26252628
    26262629    return 0;
  • trunk/src/core/RpUnitsStd.cc

    r534 r593  
    230230}
    231231
     232double inch2mile (double inch)
     233{
     234    return (inch/(63360));
     235}
     236
     237double mile2inch (double mi)
     238{
     239    return (mi*(63360));
     240}
     241
    232242/****************************************
    233243 * TEMPERATURE CONVERSIONS
  • trunk/src/core/RpUnitsStd.h

    r534 r593  
    6262double inch2yard (double inch);
    6363double yard2inch (double yd);
     64double inch2mile (double inch);
     65double mile2inch (double yd);
    6466
    6567
Note: See TracChangeset for help on using the changeset viewer.