Annotation of loncom/homework/default_homework.lcpm, revision 1.1
1.1 ! harris41 1: # file name (temp): default_homework
! 2: # used by lonxml::xmlparse() as input variable $safeinit to Apache::run::run()
! 3: #
! 4: #
! 5: sub hinton {
! 6: return 0;
! 7: }
! 8:
! 9: sub random {
! 10: my ($start,$end,$step)=@_;
! 11: my $num=1+int(($end-$start)/$step);
! 12: my $result=$start + int(rand() * $num)*$step;
! 13: return $result;
! 14: }
! 15:
! 16: sub tan { sin($_[0]) / cos($_[0]) }
! 17: sub acos { atan2(sqrt(1 - $_[0] * $_[0]), $_[0] ); }
! 18: sub asin { atan2($_[0], sqrt(1- $_[0] * $_[0]) ); }
! 19:
! 20: sub html {
! 21: if ( $external::target == "web" ) {
! 22: $Apache::scripttag::start_script::result.=@_[0];
! 23: }
! 24: }
! 25:
! 26:
! 27: sub pow {return $_[0] ** $_[1]; }
! 28: sub ceil {return (($_[0]-int($_[0]))== 0.0) ? $_[0] : (int($_[0])+ 1); }
! 29: sub floor {return int($_[0]); }
! 30:
! 31:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>