From d159ee4839fd5df1baf4807ffdd81b9736b8c296 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 12 Jan 2006 23:56:29 +0000 Subject: graphics git-svn-id: svn://tug.org/texlive/trunk@958 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/graphics/trig.sty | 99 +++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/graphics/trig.sty (limited to 'Master/texmf-dist/tex/latex/graphics/trig.sty') diff --git a/Master/texmf-dist/tex/latex/graphics/trig.sty b/Master/texmf-dist/tex/latex/graphics/trig.sty new file mode 100644 index 00000000000..ad856cdf070 --- /dev/null +++ b/Master/texmf-dist/tex/latex/graphics/trig.sty @@ -0,0 +1,99 @@ +%% +%% This is file `trig.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% trig.dtx (with options: `package') +%% +%% File: trig.dtx Copyright (C) 1993 1994 1995 1996 1997 1999 David Carlisle +%% +%% This file is part of the Standard LaTeX `Graphics Bundle'. +%% It may be distributed under the terms of the LaTeX Project Public +%% License, as described in lppl.txt in the base LaTeX distribution. +%% Either version 1.0 or, at your option, any later version. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{trig} + [1999/03/16 v1.09 sin cos tan (DPC)] +\chardef\nin@ty=90 +\chardef\@clxx=180 +\chardef\@lxxi=71 +\mathchardef\@mmmmlxviii=4068 +\chardef\@coeffz=72 +\chardef\@coefb=42 +\mathchardef\@coefc=840 +\mathchardef\@coefd=5040 +{\catcode`t=12\catcode`p=12\gdef\noPT#1pt{#1}} +\def\TG@rem@pt#1{\expandafter\noPT\the#1\space} +\def\TG@term#1{% + \dimen@\@tempb\dimen@ + \advance\dimen@ #1\p@} +\def\TG@series{% + \dimen@\@lxxi\dimen@ + \divide \dimen@ \@mmmmlxviii + \edef\@tempa{\TG@rem@pt\dimen@}% + \dimen@\@tempa\dimen@ + \edef\@tempb{\TG@rem@pt\dimen@}% + \divide\dimen@\@coeffz + \advance\dimen@\m@ne\p@ + \TG@term\@coefb + \TG@term{-\@coefc}% + \TG@term\@coefd + \dimen@\@tempa\dimen@ + \divide\dimen@ \@coefd} +\def\CalculateSin#1{{% + \expandafter\ifx\csname sin(\number#1)\endcsname\relax + \dimen@=#1\p@\TG@@sin + \expandafter\xdef\csname sin(\number#1)\endcsname + {\TG@rem@pt\dimen@}% + \fi}} +\def\CalculateCos#1{{% + \expandafter\ifx\csname cos(\number#1)\endcsname\relax + \dimen@=\nin@ty\p@ + \advance\dimen@-#1\p@ + \TG@@sin + \expandafter\xdef\csname cos(\number#1)\endcsname + {\TG@rem@pt\dimen@}% + \fi}} +\def\TG@reduce#1#2{% +\dimen@#1#2\nin@ty\p@ + \advance\dimen@#2-\@clxx\p@ + \dimen@-\dimen@ + \TG@@sin} +\def\TG@@sin{% + \ifdim\TG@reduce>+% + \else\ifdim\TG@reduce<-% + \else\TG@series\fi\fi}% +\def\UseSin#1{\csname sin(\number#1)\endcsname} +\def\UseCos#1{\csname cos(\number#1)\endcsname} +\chardef\z@num\z@ +\expandafter\let\csname sin(0)\endcsname\z@num +\expandafter\let\csname cos(0)\endcsname\@ne +\expandafter\let\csname sin(90)\endcsname\@ne +\expandafter\let\csname cos(90)\endcsname\z@num +\expandafter\let\csname sin(-90)\endcsname\m@ne +\expandafter\let\csname cos(-90)\endcsname\z@num +\expandafter\let\csname sin(180)\endcsname\z@num +\expandafter\let\csname cos(180)\endcsname\m@ne +\def\CalculateTan#1{{% + \expandafter\ifx\csname tan(\number#1)\endcsname\relax + \CalculateSin{#1}% + \CalculateCos{#1}% + \@tempdima\UseCos{#1}\p@ + \divide\@tempdima\@iv + \@tempdimb\UseSin{#1}\p@ + \@tempdimb\two@fourteen\@tempdimb + \divide\@tempdimb\@tempdima + \expandafter\xdef\csname tan(\number#1)\endcsname + {\TG@rem@pt\@tempdimb}% + \fi}} +\def\UseTan#1{\csname tan(\number#1)\endcsname} +\mathchardef\two@fourteen=16384 +\chardef\@iv=4 +\expandafter\def\csname tan(90)\endcsname{\errmessage{Infinite tan !}} +\expandafter\let\csname tan(-90)\expandafter\endcsname + \csname tan(90)\endcsname +\endinput +%% +%% End of file `trig.sty'. -- cgit v1.2.3