Package ptolemy.data

Examples of ptolemy.data.ScalarToken.doubleValue()


                ScalarToken difference = (ScalarToken) leftToken
                        .subtract(rightToken);
                if (((BooleanToken) result).booleanValue()) {
                    _relationType = RelationType.EQUAL_INEQUAL;
                } else {
                    if (difference.doubleValue() < 0) {
                        _relationType = RelationType.LESS_THAN;
                    } else {
                        _relationType = RelationType.GREATER_THAN;
                    }
                }
View Full Code Here


                        _relationType = RelationType.LESS_THAN;
                    } else {
                        _relationType = RelationType.GREATER_THAN;
                    }
                }
                _difference = difference.doubleValue();
            } else {
                // handle the relations like x == true, x == "str", or x!= false
                if (((BooleanToken) result).booleanValue()) {
                    _relationType = RelationType.TRUE;
                } else {
View Full Code Here

            // Type of the field must be convertible to double, but
            // need not actually be a double.
            ScalarToken field = (ScalarToken) defaultPropertiesValue
                    .get("range");
            range = field.doubleValue();
        }

        boolean result = (_distanceBetween(source, destination) <= range);

        if (result) {
View Full Code Here

        // with the new value of "distance."
        double powerPropagationFactorValue = ((DoubleToken) powerPropagationFactor
                .getToken()).doubleValue();

        // Calculate the receive power.
        double receivePower = transmitPower.doubleValue()
                * powerPropagationFactorValue;

        // Create a record token with the receive power.
        String[] names = { "power" };
        Token[] values = { new DoubleToken(receivePower) };
View Full Code Here

            // Type of the field must be convertible to double, but
            // need not actually be a double.
            ScalarToken field = (ScalarToken) defaultPropertiesValue
                    .get("range");
            range = field.doubleValue();
        }

        boolean result = (_distanceBetween(source, destination) <= range);

        // Whether a port is in range depends on the
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.