Class Math2
Simple calculation functions.
public static class Math2Namespace: Au.More
Assembly: Au.dll
Methods
| Name | Description | 
|---|---|
| AlignUp(int, uint) | If value is divisible by alignment, returns value. Else returns the nearest bigger number that is divisible by alignment. | 
| AlignUp(uint, uint) | If value is divisible by alignment, returns value. Else returns the nearest bigger number that is divisible by alignment. | 
| AngleFromXY(int, int) | Calculates angle degrees from coordinates x and y. | 
| Distance(POINT, POINT) | Calculates distance between two points. | 
| Distance(RECT, POINT) | Calculates distance between rectangle and point. | 
| HiByte(ushort) | Gets bits 9-16 as byte. Like C macro HIBYTE. | 
| HiShort(nint) | Gets bits 17-32 as short. Like C macro GET_Y_LPARAM. | 
| HiWord(nint) | Gets bits 17-32 as ushort. Like C macro HIWORD. | 
| LoByte(ushort) | Gets bits 1-8 as byte. Like C macro LOBYTE. | 
| LoShort(nint) | Gets bits 1-16 as short. Like C macro GET_X_LPARAM. | 
| LoWord(nint) | Gets bits 1-16 as ushort. Like C macro LOWORD. | 
| MakeLparam(POINT) | Creates uint by placing  | 
| MakeLparam(int, int) | Creates uint by placing  | 
| MakeLparam(uint, uint) | Creates uint by placing  | 
| MakeWord(int, int) | Creates ushort by placing  | 
| MakeWord(uint, uint) | Creates ushort by placing  | 
| MulDiv(int, int, int) | Returns  | 
| NintToPOINT(nint) | Converts nint containing x and y coordinates to POINT. | 
| PercentFromValue(double, double) | Calculates how many % of whole is part:  | 
| PercentFromValue(int, int, bool) | Calculates how many % of whole is part:  | 
| PercentToValue(double, double) | Returns percent % of whole:  | 
| PercentToValue(int, int, bool) | Returns percent % of whole:  | 
| SwapBits(int, int, int, int) | Swaps two ranges of bits. | 
| SwapBits(uint, int, int, int) | Swaps two ranges of bits. | 
| Swap<T>(ref T, ref T) | Swaps values of two variables:  |