diff options
Diffstat (limited to 'macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp')
-rw-r--r-- | macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp b/macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp index 28252f90bf..c308ec750c 100644 --- a/macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp +++ b/macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp @@ -30,6 +30,9 @@ nblignes:=0; boolean print; print:=false; +color coulprint; +coulprint=0.8white; + color CouleurEcran; CouleurEcran=(107/255,148/255,107/255); @@ -177,8 +180,8 @@ vardef LCD(text nt)(text rep)(expr NB)= nblignes:=nblignes+1; path Ecran; Ecran:=(u*(0,-1)--u*(LargeurEcran,-1)--u*(LargeurEcran,7)--u*(0,7)--cycle) shifted(u*(0,-8*(nblignes-1))); - fill Ecran withcolor if print=true:0.8white else:CouleurEcran fi; - draw Ecran withcolor if print=true:0.8white else:CouleurEcran fi; + fill Ecran withcolor if print=true:coulprint else:CouleurEcran fi; + draw Ecran withcolor if print=true:coulprint else:CouleurEcran fi; if length(nt)>0: for k=0 upto length(nt)-1: BlocAffichage; @@ -187,13 +190,13 @@ vardef LCD(text nt)(text rep)(expr NB)= fi; for k=1 upto NB: Ecran:=(u*(0,-1)--u*(LargeurEcran,-1)--u*(LargeurEcran,7)--u*(0,7)--cycle) shifted(u*(0,-8*(k+nblignes-1))); - fill Ecran withcolor if print=true:0.8white else:CouleurEcran fi; - draw Ecran withcolor if print=true:0.8white else:CouleurEcran fi; + fill Ecran withcolor if print=true:coulprint else:CouleurEcran fi; + draw Ecran withcolor if print=true:coulprint else:CouleurEcran fi; endfor; nblignes:=nblignes+NB+1; Ecran:=(u*(0,-1)--u*(LargeurEcran,-1)--u*(LargeurEcran,7)--u*(0,7)--cycle) shifted(u*(0,-8*(nblignes-1))); - fill Ecran withcolor if print=true:0.8white else:CouleurEcran fi; - draw Ecran withcolor if print=true:0.8white else:CouleurEcran fi; + fill Ecran withcolor if print=true:coulprint else:CouleurEcran fi; + draw Ecran withcolor if print=true:coulprint else:CouleurEcran fi; if Calcul: string toto; toto=decimal(rep); @@ -207,4 +210,17 @@ vardef LCD(text nt)(text rep)(expr NB)= fi; enddef; +def tand(expr nbang)=sind(nbang)/cosd(nbang)enddef; + +vardef arcsind(expr x)=%Définition mathématique en degré + angle((sqrt(1-x**2),x)) +enddef; + +vardef arccosd(expr x)=%Définition mathématique en degré + angle((x,sqrt(1-x**2))) +enddef; + +vardef arctand(expr x)=arcsind(x/(1++x)) +enddef; + endinput; |