本文整理了Java中com.github.mikephil.charting.utils.Utils.getNormalizedAngle()
方法的一些代码示例,展示了Utils.getNormalizedAngle()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.getNormalizedAngle()
方法的具体详情如下:
包路径:com.github.mikephil.charting.utils.Utils
类名称:Utils
方法名:getNormalizedAngle
[英]returns an angle between 0.f < 360.f (not less than zero, less than 360)
[中]返回介于0之间的角度。f<360。f(不小于零,小于360)
代码示例来源:origin: PhilJay/MPAndroidChart
/**
* Set an offset for the rotation of the RadarChart in degrees. Default 270f
* --> top (NORTH)
*
* @param angle
*/
public void setRotationAngle(float angle) {
mRawRotationAngle = angle;
mRotationAngle = Utils.getNormalizedAngle(mRawRotationAngle);
}
代码示例来源:origin: PhilJay/MPAndroidChart
@Override
public int getIndexForAngle(float angle) {
// take the current angle of the chart into consideration
float a = Utils.getNormalizedAngle(angle - getRotationAngle());
for (int i = 0; i < mAbsoluteAngles.length; i++) {
if (mAbsoluteAngles[i] > a)
return i;
}
return -1; // return -1 if no index found
}
代码示例来源:origin: PhilJay/MPAndroidChart
@Override
public int getIndexForAngle(float angle) {
// take the current angle of the chart into consideration
float a = Utils.getNormalizedAngle(angle - getRotationAngle());
float sliceangle = getSliceAngle();
int max = mData.getMaxEntryCountSet().getEntryCount();
int index = 0;
for (int i = 0; i < max; i++) {
float referenceAngle = sliceangle * (i + 1) - sliceangle / 2f;
if (referenceAngle > a) {
index = i;
break;
}
}
return index;
}
代码示例来源:origin: xiaolongonly/Ticket-Analysis
/**
* Set an offset for the rotation of the RadarChart in degrees. Default 270f
* --> top (NORTH)
*
* @param angle
*/
public void setRotationAngle(float angle) {
mRawRotationAngle = angle;
mRotationAngle = Utils.getNormalizedAngle(mRawRotationAngle);
}
代码示例来源:origin: WenWangAndroid/ChartManager
/**
* Set an offset for the rotation of the RadarChart in degrees. Default 270f
* --> top (NORTH)
*
* @param angle
*/
public void setRotationAngle(float angle) {
mRawRotationAngle = angle;
mRotationAngle = Utils.getNormalizedAngle(mRawRotationAngle);
}
代码示例来源:origin: com.github.PhilJay/MPAndroidChart
/**
* Set an offset for the rotation of the RadarChart in degrees. Default 270f
* --> top (NORTH)
*
* @param angle
*/
public void setRotationAngle(float angle) {
mRawRotationAngle = angle;
mRotationAngle = Utils.getNormalizedAngle(mRawRotationAngle);
}
代码示例来源:origin: WallaceXiao/StockChart-MPAndroidChart
/**
* Set an offset for the rotation of the RadarChart in degrees. Default 270f
* --> top (NORTH)
*
* @param angle
*/
public void setRotationAngle(float angle) {
mRawRotationAngle = angle;
mRotationAngle = Utils.getNormalizedAngle(mRawRotationAngle);
}
代码示例来源:origin: WenWangAndroid/ChartManager
@Override
public int getIndexForAngle(float angle) {
// take the current angle of the chart into consideration
float a = Utils.getNormalizedAngle(angle - getRotationAngle());
for (int i = 0; i < mAbsoluteAngles.length; i++) {
if (mAbsoluteAngles[i] > a)
return i;
}
return -1; // return -1 if no index found
}
代码示例来源:origin: WallaceXiao/StockChart-MPAndroidChart
@Override
public int getIndexForAngle(float angle) {
// take the current angle of the chart into consideration
float a = Utils.getNormalizedAngle(angle - getRotationAngle());
for (int i = 0; i < mAbsoluteAngles.length; i++) {
if (mAbsoluteAngles[i] > a) {
return i;
}
}
return -1; // return -1 if no index found
}
代码示例来源:origin: xiaolongonly/Ticket-Analysis
@Override
public int getIndexForAngle(float angle) {
// take the current angle of the chart into consideration
float a = Utils.getNormalizedAngle(angle - getRotationAngle());
for (int i = 0; i < mAbsoluteAngles.length; i++) {
if (mAbsoluteAngles[i] > a)
return i;
}
return -1; // return -1 if no index found
}
代码示例来源:origin: com.github.PhilJay/MPAndroidChart
@Override
public int getIndexForAngle(float angle) {
// take the current angle of the chart into consideration
float a = Utils.getNormalizedAngle(angle - getRotationAngle());
for (int i = 0; i < mAbsoluteAngles.length; i++) {
if (mAbsoluteAngles[i] > a)
return i;
}
return -1; // return -1 if no index found
}
代码示例来源:origin: xiaolongonly/Ticket-Analysis
@Override
public int getIndexForAngle(float angle) {
// take the current angle of the chart into consideration
float a = Utils.getNormalizedAngle(angle - getRotationAngle());
float sliceangle = getSliceAngle();
int max = mData.getMaxEntryCountSet().getEntryCount();
int index = 0;
for (int i = 0; i < max; i++) {
float referenceAngle = sliceangle * (i + 1) - sliceangle / 2f;
if (referenceAngle > a) {
index = i;
break;
}
}
return index;
}
代码示例来源:origin: com.github.PhilJay/MPAndroidChart
@Override
public int getIndexForAngle(float angle) {
// take the current angle of the chart into consideration
float a = Utils.getNormalizedAngle(angle - getRotationAngle());
float sliceangle = getSliceAngle();
int max = mData.getMaxEntryCountSet().getEntryCount();
int index = 0;
for (int i = 0; i < max; i++) {
float referenceAngle = sliceangle * (i + 1) - sliceangle / 2f;
if (referenceAngle > a) {
index = i;
break;
}
}
return index;
}
代码示例来源:origin: WenWangAndroid/ChartManager
@Override
public int getIndexForAngle(float angle) {
// take the current angle of the chart into consideration
float a = Utils.getNormalizedAngle(angle - getRotationAngle());
float sliceangle = getSliceAngle();
int max = mData.getMaxEntryCountSet().getEntryCount();
int index = 0;
for (int i = 0; i < max; i++) {
float referenceAngle = sliceangle * (i + 1) - sliceangle / 2f;
if (referenceAngle > a) {
index = i;
break;
}
}
return index;
}
代码示例来源:origin: WallaceXiao/StockChart-MPAndroidChart
@Override
public int getIndexForAngle(float angle) {
// take the current angle of the chart into consideration
float a = Utils.getNormalizedAngle(angle - getRotationAngle());
float sliceangle = getSliceAngle();
int max = mData.getMaxEntryCountSet().getEntryCount();
int index = 0;
for (int i = 0; i < max; i++) {
float referenceAngle = sliceangle * (i + 1) - sliceangle / 2f;
if (referenceAngle > a) {
index = i;
break;
}
}
return index;
}
内容来源于网络,如有侵权,请联系作者删除!