Ignore:
Timestamp:
Aug 4, 2024, 11:47:20 AM (4 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
065de93
Parents:
b797fe36
Message:

merge local changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/jiada_liang_MMath/planet.cfa

    rb797fe36 r1697c40  
    3333        double earthMass = earthWeight / surfaceGravity( EARTH );
    3434
    35         Planet p = fromInt( prng( __count_e__( Planet ) ) ); // select a random orbiting body
     35        Planet p = fromInt( prng( countof( Planet ) ) ); // select a random orbiting body
    3636//      Planet p = fromInt( prng( 9 ) ); // select a random orbiting body
    3737        choose( p ) {
    3838          case MERCURY, VENUS, EARTH, MARS:
    39                 sout | labelE( p ) | "is a rocky planet";
     39                sout | label( p ) | "is a rocky planet";
    4040          case JUPITER, SATURN, URANUS, NEPTUNE:
    41                 sout | labelE( p ) | "is a gas-giant planet";
     41                sout | label( p ) | "is a gas-giant planet";
    4242          default:
    43                 sout | labelE( p ) | "is not a planet";
     43                sout | label( p ) | "is not a planet";
    4444        }
    4545
    4646
    47         for ( p; enum Planet ) {
     47        for ( p; Planet ) {
    4848                sout | "Your weight on "
    49                  | (p == MOON ? "the" : "") | labelE(p)
     49                 | (p == MOON ? "the" : "") | label(p)
    5050                         | "is" | wd( 1,1, surfaceWeight( p, earthMass ) ) | "kg";
    5151        }
Note: See TracChangeset for help on using the changeset viewer.