Re: what do the operator * exactly ?

From: Thomas Lockhart <lockhart(at)fourpalms(dot)org>
To: molinet <molinet(at)ibp(dot)u-psud(dot)fr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: what do the operator * exactly ?
Date: 2002-05-29 14:11:59
Message-ID: 3CF4E1AF.8C5244A6@fourpalms.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Does somebody can explain me what the operators * and / do exactly?

Scaling and rotation. Addition/subtraction does translation.

> for example
> select '(1,1)'::point * '(2,2)':: point ;
> gives
> (0,4)

This is analogous to complex arithmetic, where there are two orthogonal
dimensions. If you multiply '(1,1)'::point by '(2,0)'::point, then it
appears to be simple scaling. If you multiply by '(0,1)'::point instead,
then it is a rotation, flipping the input about the X axis.

hth

- Thomas

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2002-05-29 14:29:26 Re: Invalid length of startup packet
Previous Message Martijn van Oosterhout 2002-05-29 14:03:06 Re: what do the operator * exactly ?