The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Polar and Rectangular conversion
07-26-2018, 07:01 PM (This post was last modified: 07-27-2018 11:28 AM by DrD.)
Post: #1
Polar and Rectangular conversion
rectangular_coordinates(-(sqrt(2)),(π/4)) ==> [-1,-1]

polar_coordinates(-1,-1) ==> [sqrt(2),(3/4)*π]
polar_coordinates([-1,-1]) ==> [sqrt(2),(-3/4)*π]

polar_coordinates() expects a point, and returns a vector.
rectangular_coordinates() expects a vector and returns a vector.

This is confusing for infrequent users of these commands. The polar_coordinates() command can lead to an incorrect result, if a vector is supplied as the argument, such as might be the case if the result of rectangular_coordinates() was being re-used there.

NOTE: I was using the emulator, and I have been noticing some odd behaviors (including the above). After performing a reset, I am now getting the same result from polar_coordinates() whether or not a point or vector is used. I apologize for this diversion!

-Dale-
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Polar and Rectangular conversion - DrD - 07-26-2018 07:01 PM



User(s) browsing this thread: 1 Guest(s)