Quantcast
Channel: Adobe Community : Discussion List - Using Flash Builder
Viewing all articles
Browse latest Browse all 1802

ValueObject - "Change this value according to your application's floating-point precision"

$
0
0

Working with AMF and PHP my Number values loose precision once in a while. Had a look at _Super_MyValueObjectClass and found out that the setter does something like this:

 

/**

* data/source property setters

*/

public function set t1(value:Number) : void

{

     var oldValue:Number = _internal_t1;

     if (isNaN(_internal_t1) == true || Math.abs(oldValue - value) > epsilon)

     {

         _internal_t1 = value;

         this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(th is, "t1", oldValue, _internal_t1));

     }

}

 

Looking for epsilon I found this:

 

// Change this value according to your application's floating-point precision

private static var epsilon:Number = 0.0001;

 

The Problem is, _Super_MyValueObjectClass is autogenerated, but I don´t want this stupid epsilon. How can I get rid of it? Overriding it in the subclasses would be possible but also very annoying as I have a lot of value objects. I searched the net but found nothing. Please help.


Viewing all articles
Browse latest Browse all 1802

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>