当前位置: 首页>>代码示例>>Java>>正文


Java MathHelper类代码示例

本文整理汇总了Java中org.achartengine.util.MathHelper的典型用法代码示例。如果您正苦于以下问题:Java MathHelper类的具体用法?Java MathHelper怎么用?Java MathHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MathHelper类属于org.achartengine.util包,在下文中一共展示了MathHelper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getYLabels

import org.achartengine.util.MathHelper; //导入依赖的package包/类
protected Map<Integer, List<Double>> getYLabels(double[] minY, double[] maxY, int maxScaleNumber) {
  Map<Integer, List<Double>> allYLabels = new HashMap<Integer, List<Double>>();
  for (int i = 0; i < maxScaleNumber; i++) {
    allYLabels.put(i,
        getValidLabels(MathHelper.getLabels(minY[i], maxY[i], mRenderer.getYLabels())));
  }
  return allYLabels;
}
 
开发者ID:sdrausty,项目名称:buildAPKsApps,代码行数:9,代码来源:XYChart.java

示例2: initAxesRangeForScale

import org.achartengine.util.MathHelper; //导入依赖的package包/类
public void initAxesRangeForScale(int i) {
  mMinX[i] = MathHelper.NULL_VALUE;
  mMaxX[i] = -MathHelper.NULL_VALUE;
  mMinY[i] = MathHelper.NULL_VALUE;
  mMaxY[i] = -MathHelper.NULL_VALUE;
  double[] range = new double[] { mMinX[i], mMaxX[i], mMinY[i], mMaxY[i] };
  initialRange.put(i, range);
  mYTitle[i] = "";
  mYTextLabels.put(i, new HashMap<Double, String>());
  yLabelsAlign[i] = Align.CENTER;
  yAxisAlign[i] = Align.LEFT;
}
 
开发者ID:sdrausty,项目名称:buildAPKsApps,代码行数:13,代码来源:XYMultipleSeriesRenderer.java

示例3: initRange

import org.achartengine.util.MathHelper; //导入依赖的package包/类
/**
 * Initializes the range for both axes.
 */
private void initRange() {
  mMinX = MathHelper.NULL_VALUE;
  mMaxX = -MathHelper.NULL_VALUE;
  mMinY = MathHelper.NULL_VALUE;
  mMaxY = -MathHelper.NULL_VALUE;
  int length = getItemCount();
  for (int k = 0; k < length; k++) {
    double x = getX(k);
    double y = getY(k);
    updateRange(x, y);
  }
}
 
开发者ID:sdrausty,项目名称:buildAPKsApps,代码行数:16,代码来源:XYSeries.java

示例4: initRange

import org.achartengine.util.MathHelper; //导入依赖的package包/类
/**
 * Initializes the values range.
 */
private void initRange() {
  mMinValue = MathHelper.NULL_VALUE;
  mMaxValue = MathHelper.NULL_VALUE;
  int length = getItemCount();
  for (int k = 0; k < length; k++) {
    updateRange(getValue(k));
  }
}
 
开发者ID:sdrausty,项目名称:buildAPKsApps,代码行数:12,代码来源:XYValueSeries.java

示例5: fillInDiscontinuity

import org.achartengine.util.MathHelper; //导入依赖的package包/类
/**
 * Creates a discontinuity of the satellites that has been seen but not reported in this batch
 * of measurements
 */
private void fillInDiscontinuity(int tab, double referenceTimeSeconds) {
  for (XYMultipleSeriesDataset dataSet : mDataSetList[tab]) {
    for (int i = 0; i < dataSet.getSeriesCount(); i++) {
      if (dataSet.getSeriesAt(i).getMaxX() < referenceTimeSeconds) {
        dataSet.getSeriesAt(i).add(referenceTimeSeconds, MathHelper.NULL_VALUE);
      }
    }
  }
}
 
开发者ID:google,项目名称:gps-measurement-tools,代码行数:14,代码来源:PlotFragment.java

示例6: initRange

import org.achartengine.util.MathHelper; //导入依赖的package包/类
/**
 * Initializes the values range.
 */
private void initRange() {
  mMinValue = MathHelper.NULL_VALUE;
  mMaxValue = -MathHelper.NULL_VALUE;
  int length = getItemCount();
  for (int k = 0; k < length; k++) {
    updateRange(getValue(k));
  }
}
 
开发者ID:ddanny,项目名称:achartengine,代码行数:12,代码来源:XYValueSeries.java

示例7: getYLabels

import org.achartengine.util.MathHelper; //导入依赖的package包/类
protected Map getYLabels(double ad[], double ad1[], int i)
{
    HashMap hashmap = new HashMap();
    for (int j = 0; j < i; j++)
    {
        hashmap.put(Integer.valueOf(j), a(MathHelper.getLabels(ad[j], ad1[j], mRenderer.getYLabels())));
    }

    return hashmap;
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:11,代码来源:XYChart.java

示例8: getYLabels

import org.achartengine.util.MathHelper; //导入依赖的package包/类
protected Map<Integer, List<Double>> getYLabels(double[] minY, double[] maxY, int maxScaleNumber, double[] minimumDistance) {
  Map<Integer, List<Double>> allYLabels = new HashMap<Integer, List<Double>>();
  for (int i = 0; i < maxScaleNumber; i++) {
    allYLabels.put(i,
        getValidLabels(MathHelper.getLabels(minY[i], maxY[i], mRenderer.getYLabels(), minimumDistance[i])));
  }
  return allYLabels;
}
 
开发者ID:InQBarna,项目名称:AChartEngine,代码行数:9,代码来源:XYChart.java

示例9: getXLabels

import org.achartengine.util.MathHelper; //导入依赖的package包/类
protected List<Double> getXLabels(double min, double max, int count) {
  return MathHelper.getLabels(min, max, count);
}
 
开发者ID:sdrausty,项目名称:buildAPKsApps,代码行数:4,代码来源:XYChart.java

示例10: isNullValue

import org.achartengine.util.MathHelper; //导入依赖的package包/类
public boolean isNullValue(double value) {
  return Double.isNaN(value) || Double.isInfinite(value) || value == MathHelper.NULL_VALUE;
}
 
开发者ID:sdrausty,项目名称:buildAPKsApps,代码行数:4,代码来源:AbstractChart.java

示例11: apply

import org.achartengine.util.MathHelper; //导入依赖的package包/类
/**
 * Apply the tool.
 */
public void apply() {
  if (mChart instanceof XYChart) {
    if (((XYChart) mChart).getDataset() == null) {
      return;
    }
    int scales = mRenderer.getScalesCount();
    if (mRenderer.isInitialRangeSet()) {
      for (int i = 0; i < scales; i++) {
        if (mRenderer.isInitialRangeSet(i)) {
          mRenderer.setRange(mRenderer.getInitialRange(i), i);
        }
      }
    } else {
      XYSeries[] series = ((XYChart) mChart).getDataset().getSeries();
      double[] range = null;
      int length = series.length;
      if (length > 0) {
        for (int i = 0; i < scales; i++) {
          range = new double[] { MathHelper.NULL_VALUE, -MathHelper.NULL_VALUE,
              MathHelper.NULL_VALUE, -MathHelper.NULL_VALUE };
          for (int j = 0; j < length; j++) {
            if (i == series[j].getScaleNumber()) {
              range[0] = Math.min(range[0], series[j].getMinX());
              range[1] = Math.max(range[1], series[j].getMaxX());
              range[2] = Math.min(range[2], series[j].getMinY());
              range[3] = Math.max(range[3], series[j].getMaxY());
            }
          }
          double marginX = Math.abs(range[1] - range[0]) / 40;
          double marginY = Math.abs(range[3] - range[2]) / 40;
          mRenderer.setRange(new double[] { range[0] - marginX, range[1] + marginX,
              range[2] - marginY, range[3] + marginY }, i);
        }
      }
    }
  } else {
    DefaultRenderer renderer = ((RoundChart) mChart).getRenderer();
    renderer.setScale(renderer.getOriginalScale());
  }
}
 
开发者ID:sdrausty,项目名称:buildAPKsApps,代码行数:44,代码来源:FitZoom.java

示例12: getXLabels

import org.achartengine.util.MathHelper; //导入依赖的package包/类
protected List getXLabels(double d1, double d2, int i)
{
    return MathHelper.getLabels(d1, d2, i);
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:5,代码来源:XYChart.java

示例13: getXLabels

import org.achartengine.util.MathHelper; //导入依赖的package包/类
protected List<Double> getXLabels(double min, double max, int count, double minimumDistance) {
  return MathHelper.getLabels(min, max, count, minimumDistance);
}
 
开发者ID:InQBarna,项目名称:AChartEngine,代码行数:4,代码来源:XYChart.java

示例14: getDefaultMinimum

import org.achartengine.util.MathHelper; //导入依赖的package包/类
/**
 * Returns the default axis minimum.
 * 
 * @return the default axis minimum
 */
public double getDefaultMinimum() {
  return MathHelper.NULL_VALUE;
}
 
开发者ID:sdrausty,项目名称:buildAPKsApps,代码行数:9,代码来源:XYChart.java

示例15: isMinValueSet

import org.achartengine.util.MathHelper; //导入依赖的package包/类
/**
 * Returns if the minimum dial value was set.
 * 
 * @return the minimum dial value was set or not
 */
public boolean isMinValueSet() {
  return mMinValue != MathHelper.NULL_VALUE;
}
 
开发者ID:sdrausty,项目名称:buildAPKsApps,代码行数:9,代码来源:DialRenderer.java


注:本文中的org.achartengine.util.MathHelper类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。