C# Класс WebGame.Utility

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
Random System.Random

Открытые методы

Метод Описание
ApproximatelyEqual ( double left, double right, double epsilon = 0.001 ) : bool
FromUnixTimestamp ( int unixTimestamp ) : System.DateTime

Creates a new System.DateTime from the specified timestamp (time measured in the number of seconds).

Magnitude ( this vector ) : double
Multiply ( this vector, double coefficient ) : Vector3
NormalizeOrientation ( this angle ) : double
NormalizeTurn ( this angle ) : double
PointToSegmentDistance ( Vector3 segmentBegin, Vector3 segmentEnd, Vector3 point ) : double
PrintTimeSpan ( this time, bool isInPast = true ) : string
Quadrance ( this vector ) : double
SphereIntersectsLineSegment ( Vector3 segmentBegin, Vector3 segmentEnd, Vector3 sphereCenter, double radius ) : bool
UnixTimestamp ( System.DateTime dateTime ) : int

Returns the specified time measured in the number of seconds.

randomBool ( ) : bool

Приватные методы

Метод Описание
_NormalizeAngle ( this angle, double lowerBound, double upperBound, double range = 2*Math.PI ) : double

Описание методов

ApproximatelyEqual() публичный статический Метод

public static ApproximatelyEqual ( double left, double right, double epsilon = 0.001 ) : bool
left double
right double
epsilon double
Результат bool

FromUnixTimestamp() публичный статический Метод

Creates a new System.DateTime from the specified timestamp (time measured in the number of seconds).
public static FromUnixTimestamp ( int unixTimestamp ) : System.DateTime
unixTimestamp int The timestamp that represents the date to be created.
Результат System.DateTime

Magnitude() публичный статический Метод

public static Magnitude ( this vector ) : double
vector this
Результат double

Multiply() публичный статический Метод

public static Multiply ( this vector, double coefficient ) : Vector3
vector this
coefficient double
Результат Vector3

NormalizeOrientation() публичный статический Метод

public static NormalizeOrientation ( this angle ) : double
angle this
Результат double

NormalizeTurn() публичный статический Метод

public static NormalizeTurn ( this angle ) : double
angle this
Результат double

PointToSegmentDistance() публичный статический Метод

public static PointToSegmentDistance ( Vector3 segmentBegin, Vector3 segmentEnd, Vector3 point ) : double
segmentBegin Vector3
segmentEnd Vector3
point Vector3
Результат double

PrintTimeSpan() публичный статический Метод

public static PrintTimeSpan ( this time, bool isInPast = true ) : string
time this
isInPast bool
Результат string

Quadrance() публичный статический Метод

public static Quadrance ( this vector ) : double
vector this
Результат double

SphereIntersectsLineSegment() публичный статический Метод

public static SphereIntersectsLineSegment ( Vector3 segmentBegin, Vector3 segmentEnd, Vector3 sphereCenter, double radius ) : bool
segmentBegin Vector3
segmentEnd Vector3
sphereCenter Vector3
radius double
Результат bool

UnixTimestamp() публичный статический Метод

Returns the specified time measured in the number of seconds.
public static UnixTimestamp ( System.DateTime dateTime ) : int
dateTime System.DateTime The System.DateTime to obtain the number of seconds from.
Результат int

randomBool() публичный статический Метод

public static randomBool ( ) : bool
Результат bool

Описание свойств

Random публичное статическое свойство

public static Random,System Random
Результат System.Random