C# 클래스 ZXing.Common.Detector.MathUtils

General math-related and numeric utility functions.
파일 보기 프로젝트 열기: Redth/ZXing.Net.Mobile

공개 메소드들

메소드 설명
distance ( float aX, float aY, float bX, float bY ) : float

distance ( int aX, int aY, int bX, int bY ) : float

round ( float d ) : int

Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut differ slightly from {@link Math#round(float)} in that half rounds down for negative values. -2.5 rounds to -3, not -2. For purposes here it makes no difference.

sum ( int array ) : int

메소드 상세

distance() 공개 정적인 메소드

public static distance ( float aX, float aY, float bX, float bY ) : float
aX float
aY float
bX float
bY float
리턴 float

distance() 공개 정적인 메소드

public static distance ( int aX, int aY, int bX, int bY ) : float
aX int
aY int
bX int
bY int
리턴 float

round() 공개 정적인 메소드

Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut differ slightly from {@link Math#round(float)} in that half rounds down for negative values. -2.5 rounds to -3, not -2. For purposes here it makes no difference.
public static round ( float d ) : int
d float real value to round
리턴 int

sum() 공개 정적인 메소드

public static sum ( int array ) : int
array int values to sum
리턴 int