[pstricks] declare variable and initialize with a value
Doris Wagner
doris.wagner at mac.com
Sat Sep 15 21:09:37 CEST 2007
and how can I use coordinates with computations, for example (1+r2,
1-r2)?
> Doris Wagner schrieb:
>
>> I have a picture and in this picture a terrible coordinate which I
>> have
>> to use often, for example the square root of 2.
>> How can I avoid always typing 1.4142...? (And how many digits does
>> PostScript take, by the way?)
>> is there something similar to
>>
>> double x=1.41421356;
>>
>> such that I can use x in the code, for example \psline(1,1)(1,\x)
>
> \pstVerb{/r2 { 2 sqrt } bind def
>
> \psline(1,1)(!1 r2)
>
> then you have all digits wich are possible, depending to
> your PS level.
>
> Herbert
>
> _______________________________________________
> pstricks mailing list
> pstricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
More information about the PSTricks
mailing list