Skip to content

Commit

Permalink
Run perltidy on the code with the new version.
Browse files Browse the repository at this point in the history
  • Loading branch information
drgrice1 committed Nov 21, 2024
1 parent 8c369f2 commit 9b8c8a3
Show file tree
Hide file tree
Showing 26 changed files with 157 additions and 158 deletions.
2 changes: 1 addition & 1 deletion bin/parse-problem-doc.pl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ BEGIN
use File::Basename qw(fileparse basename);
use Getopt::Long;
use File::Copy qw(copy);
use YAML::XS qw(DumpFile);
use YAML::XS qw(DumpFile);
use Pod::Simple::Search;

use SampleProblemParser qw(parseSampleProblem generateMetadata);
Expand Down
4 changes: 2 additions & 2 deletions lib/Fun.pm
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ my $FUNCTION_REFERENCE = "Fun";

my %fields = (
tstart => -1, # (tstart,$tstop) constitutes the domain
tstop => 1,
steps => 50,
tstop => 1,
steps => 50,
color => 'blue',
x_rule => \&identity,
y_rule => \&identity,
Expand Down
2 changes: 1 addition & 1 deletion lib/Hermite.pm
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ sub internal_critical_points {
}

sub internal_inflection_points {
my ($x0, $l, $lp,, $x1, $r, $rp, $rh_roots, $rf_function) = @_;
my ($x0, $l, $lp, $x1, $r, $rp, $rh_roots, $rf_function) = @_;
#data for one segment of the hermite spline

# coefficients for the approximating polynomial
Expand Down
6 changes: 3 additions & 3 deletions lib/Regression.pm
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,9 @@ if (DEBUGGING) {

my $reg = Statistics::Regression->new(3, "sample regression", [ "const", "someX", "someY" ]);
$reg->include(2.0, [ 1.0, 3.0, -1.0 ]);
$reg->include(1.0, [ 1.0, 5.0, 2.0 ]);
$reg->include(20.0, [ 1.0, 31.0, 0.0 ]);
$reg->include(15.0, [ 1.0, 11.0, 2.0 ]);
$reg->include(1.0, [ 1.0, 5.0, 2.0 ]);
$reg->include(20.0, [ 1.0, 31.0, 0.0 ]);
$reg->include(15.0, [ 1.0, 11.0, 2.0 ]);

# $reg->print(); or: my $coefs= $reg->theta(); print @coefs; print $reg->rsq;
# my $coefs= $reg->theta(); print $coeff[0];
Expand Down
2 changes: 1 addition & 1 deletion lib/SampleProblemParser.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use experimental 'signatures';
use feature 'say';

use File::Basename qw(dirname basename);
use File::Find qw(find);
use File::Find qw(find);
use Pandoc;

our @EXPORT_OK = qw(parseSampleProblem generateMetadata);
Expand Down
144 changes: 72 additions & 72 deletions lib/Units.pm
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,9 @@ our %known_units = (
s => -2
},
uN => { # micronewton
factor => 1E-6,
m => 1,
kg => 1,
factor => 1E-6,
m => 1,
kg => 1,
s => -2,
aliases => [ 'microN', "\x{00B5}N" ]
},
Expand All @@ -346,16 +346,16 @@ our %known_units = (
s => -2
},
lb => { # pound
factor => 4.4482216152605,
m => 1,
kg => 1,
factor => 4.4482216152605,
m => 1,
kg => 1,
s => -2,
aliases => [ 'pound', 'pounds', 'lbs' ]
},
ton => {
factor => 8900,
m => 1,
kg => 1,
factor => 8900,
m => 1,
kg => 1,
s => -2,
aliases => ['tons']
},
Expand Down Expand Up @@ -480,69 +480,69 @@ our %known_units = (

# PRESSURE
Pa => { # pascal
factor => 1,
factor => 1,
m => -1,
kg => 1,
kg => 1,
s => -2
},
kPa => { # kilopascal
factor => 1000,
m => -1,
kg => 1,
kg => 1,
s => -2
},
MPa => { # megapascal
factor => 1E6,
m => -1,
kg => 1,
kg => 1,
s => -2
},
GPa => { # gigapascal
factor => 1E9,
m => -1,
kg => 1,
kg => 1,
s => -2
},
atm => { # atmosphere
factor => 1.01E5,
m => -1,
kg => 1,
kg => 1,
s => -2
},
bar => {
factor => 100000,
m => -1,
kg => 1,
kg => 1,
s => -2
},
mbar => { # millibar
factor => 100,
m => -1,
kg => 1,
kg => 1,
s => -2
},
Torr => {
factor => 133.322,
m => -1,
kg => 1,
kg => 1,
s => -2
},
mmHg => {
factor => 133.322,
m => -1,
kg => 1,
kg => 1,
s => -2
},
cmH2O => { # centimeters of water
factor => 98.0638,
m => -1,
kg => 1,
kg => 1,
s => -2
},
psi => { # pounds per square inch
factor => 6895,
m => -1,
kg => 1,
kg => 1,
s => -2
},

Expand All @@ -569,85 +569,85 @@ our %known_units = (
s => 1,
},
V => { # volt (also J/C)
factor => 1,
kg => 1,
m => 2,
factor => 1,
kg => 1,
m => 2,
amp => -1,
s => -3,
},
mV => { # millivolt
factor => 0.001,
kg => 1,
m => 2,
kg => 1,
m => 2,
amp => -1,
s => -3,
},
kV => { # killivolt
factor => 1000,
kg => 1,
m => 2,
kg => 1,
m => 2,
amp => -1,
s => -3,
},
MV => { # megavolt
factor => 1E6,
kg => 1,
m => 2,
kg => 1,
m => 2,
amp => -1,
s => -3,
},
F => { # farad (also C/V)
factor => 1,
amp => 2,
s => 4,
factor => 1,
amp => 2,
s => 4,
kg => -1,
m => -2,
},
mF => { # millifarad
factor => 0.001,
amp => 2,
s => 4,
amp => 2,
s => 4,
kg => -1,
m => -2,
},
uF => { # microfarad
factor => 1E-6,
amp => 2,
s => 4,
factor => 1E-6,
amp => 2,
s => 4,
kg => -1,
m => -2,
aliases => [ "\x{00B5}F", "\x{338C}" ]
},
ohm => { # V/amp
factor => 1,
kg => 1,
m => 2,
factor => 1,
kg => 1,
m => 2,
amp => -2,
s => -3,
aliases => ["\x{2126}"]
},
kohm => { # kiloohm
factor => 1000,
kg => 1,
m => 2,
factor => 1000,
kg => 1,
m => 2,
amp => -2,
s => -3,
aliases => [ "k\x{2126}", "\x{33C0}" ]
},
Mohm => { # megaohm
factor => 1E6,
kg => 1,
m => 2,
factor => 1E6,
kg => 1,
m => 2,
amp => -2,
s => -3,
aliases => [ "M\x{2126}", "\x{33C1}" ]
},
S => { # siemens (1/ohm)
factor => 1,
factor => 1,
kg => -1,
m => -2,
amp => 2,
s => 3,
amp => 2,
s => 3,
},
mA => { # milliampere
factor => 0.001,
Expand All @@ -656,47 +656,47 @@ our %known_units = (

# MAGNETIC UNITS
T => { # tesla (also kg / A s^2 or N s / C m)
factor => 1,
kg => 1,
factor => 1,
kg => 1,
amp => -1,
s => -2,
},
mT => { # millitesla
factor => 0.001,
kg => 1,
kg => 1,
amp => -1,
s => -2,
},
G => { # gauss
factor => 1E-4,
kg => 1,
kg => 1,
amp => -1,
s => -2,
},
Wb => { # weber (also T m^2)
factor => 1,
kg => 1,
m => 2,
factor => 1,
kg => 1,
m => 2,
amp => -1,
s => -2,
},
H => { # henry (also V s/amp)
factor => 1,
kg => 1,
m => 2,
factor => 1,
kg => 1,
m => 2,
amp => -2,
s => -2,
},

# LUMINOSITY
lm => { # lumen (luminous flux)
factor => 1,
cd => 1,
factor => 1,
cd => 1,
rad => -2,
},
lx => { # lux (illuminance)
factor => 1,
cd => 1,
factor => 1,
cd => 1,
rad => -2,
m => -2,
},
Expand All @@ -722,23 +722,23 @@ our %known_units = (
# RADIATION
Sv => { # sievert, dose equivalent radiation (http://xkcd.com/radiation)
factor => 1,
m => 2,
factor => 1,
m => 2,
s => -2,
},
mSv => { # millisievert (http://blog.xkcd.com/2011/03/19/radiation-chart)
factor => 0.001,
m => 2,
m => 2,
s => -2,
},
uSv => { # microsievert (http://blog.xkcd.com/2011/04/26/radiation-chart-update)
factor => 0.000001,
m => 2,
factor => 0.000001,
m => 2,
s => -2,
aliases => ["\x{00B5}Sv"]
},
Bq => { # becquerel, radioactivity (https://en.wikipedia.org/wiki/Becquerel)
factor => 1,
factor => 1,
s => -1,
},

Expand All @@ -756,8 +756,8 @@ our %known_units = (
mol => 1,
},
kat => { # katal (catalytic activity)
factor => 1,
mol => 1,
factor => 1,
mol => 1,
s => -1,
},

Expand Down
2 changes: 1 addition & 1 deletion lib/Value/AnswerChecker.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ sub ANS_MATRIX {
$def = $self->context->lists->get('Matrix');
$open = $self->{open} || $def->{open};
$close = $self->{close} || $def->{close};
return $self->ans_matrix($extend, $name, $self->length, 1, $size, $open, $close, '',, '', %options)
return $self->ans_matrix($extend, $name, $self->length, 1, $size, $open, $close, '', '', %options)
if ($self->{ColumnVector});
$def = $self->context->lists->get('Vector');
$open = $self->{open} || $def->{open};
Expand Down
Loading

0 comments on commit 9b8c8a3

Please sign in to comment.