File:  [LON-CAPA] / loncom / homework / default_homework.lcpm
Revision 1.1: download - view: text, annotated - select for diffs
Tue Sep 26 19:29:07 2000 UTC (23 years, 6 months ago) by harris41
Branches: MAIN
CVS tags: HEAD
adding a file suffix extension (lcpm=loncapa perl module; invented by Mr. Guy, submitted to CVS in the year 2000... wow, it's historic) -Scott

# file name (temp): default_homework 
# used by lonxml::xmlparse() as input variable $safeinit to Apache::run::run()
# 
#
sub hinton {
  return 0;
}

sub random {
  my ($start,$end,$step)=@_;
  my $num=1+int(($end-$start)/$step);
  my $result=$start + int(rand() * $num)*$step;
  return $result;
}

sub tan  { sin($_[0]) / cos($_[0]) }
sub acos { atan2(sqrt(1 - $_[0] * $_[0]), $_[0] ); }
sub asin { atan2($_[0], sqrt(1- $_[0] * $_[0]) );  }

sub html {
  if ( $external::target == "web" ) {
    $Apache::scripttag::start_script::result.=@_[0];
  }
}


sub pow   {return $_[0] ** $_[1]; }
sub ceil  {return (($_[0]-int($_[0]))== 0.0) ? $_[0] : (int($_[0])+ 1); }
sub floor {return int($_[0]);  }



FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>