utils
library
Functions
-
aangle(num x1, num y1, num x2, num y2)
→ double
-
-
angle(num x1, num y1, num x2, num y2)
→ double
-
assume p1(x1, y1) is the center,
the angle of the line between p1 and p2 rotates from the vertical Y axis line of the coordinates
-
crcInt(String data, [int? crc])
→ int
-
CRC32
Copyright (C) 2012, Kai Sellgren
Licensed under the MIT License.
http://www.opensource.org/licenses/mit-license.php
-
crcString(String data, [int? crc])
→ String
-
-
crcTimestamp()
→ String
-
-
datetime()
→ String
-
Get the date string from DateTime.now().
'20240307112422357516'
-
deepCopy(dynamic value)
→ dynamic
-
-
degrees(double radians)
→ double
-
Convert
radians to degrees.
-
gaussianNoise(double mean, double standardDeviation, {Random? randomGenerator})
→ double
-
-
gradualValue(num input, num target, {double power = 0.5})
→ double
-
Input a value and a target, get a output between 0.0 and 1.0.
The more the input is near the target, the more the output is near 1.0.
-
isEqual(dynamic a, dynamic b)
→ bool
-
-
isJsonDataType(dynamic object)
→ bool
-
-
jsonify(dynamic value, {bool deep = true})
→ dynamic
-
-
jsonifyList(Iterable list)
→ List
-
-
jsonifyStruct(HTStruct struct, {HTStruct? from})
→ Map<String, dynamic>
-
-
radians(double degrees)
→ double
-
Convert
degrees to radians.
-
radiusToSigma(double radius)
→ double
-
-
randomNID({int length = 8, bool withTime = false})
→ String
-
Get a random id consists by number.
-
randomUID({int length = 4, bool withTime = false})
→ String
-
Get a random id consists by number and letters.
-
randomUUID()
→ String
-
Get a random UUID
-
timestamp()
→ String
-