Re: Newbie: Rotataion2D use problem

• To: mathgroup at smc.vnet.net
• Subject: [mg66725] Re: Newbie: Rotataion2D use problem
• From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
• Date: Sat, 27 May 2006 21:03:50 -0400 (EDT)
• Organization: The Open University, Milton Keynes, UK
• References: <e591hh\$35m\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```akil wrote:
> I have some problems using Mathematica's Rotate2D, it doesnot give the results as I want them
>
> Eample:
>
> a={10, 30}
> b={80., 0.}
> c={38.7689, 0.}
> theta = -0.24497866312686414`
> theta2 = -0.3430239404207034`
> Rotate2D[a, theta, test[[1]]]
> Rotate2D[%, theta2, test[[2]]]
>
> this gives:
> \!\({2.7134309891835002`, 1.7763568394002505`*^-15}\)
>
> While the y-value should be 0 instead of 1.7763568394002505`*^-15.
>
> Anyone know how I can easily fix this, so that I get 0 here instead?

Hi Akil,

Use the built-in function *Chop* [1]: "Chop[expr] replaces approximate
real numbers in expr that are close to zero by the exact integer 0."

In[2]:=
Chop /@ {2.7134309891835002, 1.7763568394002505*^-15}

Out[2]=
{2.71343, 0}

Best regards,
Jean-Marc

[1] http://documents.wolfram.com/mathematica/functions/Chop

```

• Prev by Date: Closed Form solution too much to hope for?
• Next by Date: Re: Formatting table output
• Previous by thread: Re: Newbie: Rotataion2D use problem
• Next by thread: Re: Newbie: Rotataion2D use problem