get the current object value as Float if the current Float can not be
cast as Integer return null.
966533
public Float asFloatObj() {
		if (current == null)
			return null;
		if (current instanceof Number) {
			if (current instanceof Float)
				return (Float) current;
			return Float.valueOf(((Number) current).floatValue());
		}
		return Float.NaN;
	}
175161
def simxGetObjectFloatParameter(clientID, objectHandle, parameterID, operationMode):
    '''
    
    '''
    
    parameterValue = ct.c_float()
    return c_GetObjectFloatParameter(clientID, objectHandle, parameterID, ct.byref(parameterValue), operationMode), parameterValue.value
831062
public Float getFloat (int index) {
        Double value = getDouble (index);
        return (value != null) ? value.floatValue () : null;
    }
344080
@Override
    public final float getFloat(final int i) {
        double val = this.array.optDouble(i, Double.MAX_VALUE);
        if (val == Double.MAX_VALUE) {
            throw new ObjectMissingException(this, "[" + i + "]");
        }
        return (float) val;
    }
115971
public static Float toFloat(Object o) throws PageException {
	if (o instanceof Float) return (Float) o;
	return new Float(toFloatValue(o));
    }
23597
public static Double getAsDouble(Object value) {
		Double result = null;

		try {
			if (value instanceof String) {
				result = Double.valueOf((String) value);
			} else if (value instanceof Number) {
				result = ((Number) value).doubleValue();
			} else {
				result = null;
			}
		} catch (Exception e) {
			result = null;
		}

		return result == null ? 0 : result;
	}
530118
public Float getAsFloat(String key) {
        Object value = mValues.get(key);
        try {
            return value != null ? ((Number) value).floatValue() : null;
        } catch (ClassCastException e) {
            if (value instanceof CharSequence) {
                try {
                    return Float.valueOf(value.toString());
                } catch (NumberFormatException e2) {
                    logger.severe( "Cannot parse Float value for " + value + " at key " + key);
                    return null;
                }
            } else {
                logger.log(Level.SEVERE, "Cannot cast value for " + key + " to a Float: " + value, e);
                return null;
            }
        }
    }
306201
def to_float_with_default(value, default_value):
        
        result = FloatConverter.to_nullable_float(value)
        return result if result != None else default_value
1282759
public Double asDoubleObj() {
		if (current == null)
			return null;
		if (current instanceof Number) {
			if (current instanceof Double)
				return (Double) current;
			return Double.valueOf(((Number) current).doubleValue());
		}
		return Double.NaN;
	}
969690
public Float getFloat(String name) {
        Object o = get(name);
        if (o instanceof Number) {
            return ((Number)o).floatValue();
        }

        if (o != null) {
            try {
                String string = o.toString();
                if (string != null) {
                    return Float.parseFloat(string);
                }
            }
            catch (NumberFormatException e) {}
        }
        return null;
    }
131943
public static float makeFloatValue( Object obj )
  {
    if( obj == null )
    {
      return Float.NaN;
    }

    return CommonServices.getCoercionManager().makePrimitiveFloatFrom( obj );
  }
21653
def get_as_float(self, key):
        
        value = self.get(key)
        return FloatConverter.to_float(value)
693170
public Integer asIntegerObj() {
		if (current == null)
			return null;
		if (current instanceof Number) {
			if (current instanceof Integer)
				return (Integer) current;
			if (current instanceof Long) {
				Long l = (Long) current;
				if (l.longValue() == l.intValue()) {
					return Integer.valueOf(l.intValue());
				}
			}
			return null;
		}
		return null;
	}
533742
def getValue(self, unit=None):
        

        if unit or self.unit:
            r = float(self.value * UnitToValue(self.unit)) / UnitToValue(unit)
            return int(round(r)) if isinstance(self.value, int) else r
        return self.value
593045
def _cast_to_type(self, value):
        
        try:
            return float(value)
        except (ValueError, TypeError):
            self.fail('invalid', value=value)
984622
public static float getFloat(JSONValue value) {
        if (value == null)
            return 0;
        if (!(value instanceof Number))
            throw new JSONException(NOT_A_NUMBER);
        return ((Number)value).floatValue();
    }
82121
def get_float(self, key, optional=False):
        
        return self._get_typed_value(key, float, lambda x: float(x), optional)