5 messages in com.googlegroups.sketchuprubyRe: floating point precision| From | Sent On | Attachments |
|---|---|---|
| bve...@gmail.com | 20 Jan 2008 21:01 | |
| Todd Burch - Katy, Texas | 21 Jan 2008 04:48 | |
| bve...@gmail.com | 21 Jan 2008 13:47 | |
| Todd Burch - Katy, Texas | 21 Jan 2008 14:45 | |
| Francis | 22 Jan 2008 09:28 |
| Subject: | Re: floating point precision![]() |
|---|---|
| From: | Todd Burch - Katy, Texas (mr.t...@gmail.com) |
| Date: | 01/21/2008 02:45:58 PM |
| List: | com.googlegroups.sketchupruby |
Since you've overridden the to_s method, you've taken control over the output. The input is no different than before, just the output is different, and just your output is different.
What's the question? How do you replicate WHAT?
Todd
On Jan 21, 3:47 pm, "[email address]" wrote:
how can i replicate it?
On Jan 21, 7:49 am, Todd Burch - Katy, Texas wrote:
It's most likely just floating point precision rounding.
Todd
On Jan 20, 11:01 pm, "[email address]" wrote:
I'm trying to understand the transformation class. i wrote an observer to display the transformation array whenever the entity changed. so i created a cube and made it into a component and added my observer to it. to start with, it looks like this (i also overloaded the to_s function for transform)
[1.0, 0.0, 0.0, 0.0] [0.0, 1.0, 0.0, 0.0] [0.0, 0.0, 1.0, 0.0] [0.0,0.0, 0.0, 1.0]
however after rotating +90 degrees and then back to its original the matrix looks like this [1.0, 0.0, 0.0, 0.0] [0.0, 1.0, 0.0, 0.0] [0.0, 0.0, 1.0, 0.0] [6.48592290986016e-013,-6.7562622163564e-013, 0.0, 1.0]
the numbers are really tiny. so minuscule that it would never affect calculations significantly but if i use transformation.origin i get "Point3d(0, 0, 0)"
furthermore "ss.transformation.origin.x" yields 6.48592290986016e-013
so my first question, in a long list of questions, how does it know?




