tweaking names
This commit is contained in:
parent
59d38f7885
commit
824749976e
|
@ -229,10 +229,11 @@ module Floats = {
|
||||||
|
|
||||||
let floatCompare: (float, float) => int = compare
|
let floatCompare: (float, float) => int = compare
|
||||||
let sort = t => {
|
let sort = t => {
|
||||||
let typed = t->Js.TypedArray2.Float64Array.make->Js.TypedArray2.Float64Array.sortInPlace
|
let typedArray = t->Js.TypedArray2.Float64Array.make
|
||||||
|
typedArray->Js.TypedArray2.Float64Array.sortInPlace->ignore
|
||||||
// why is there no standard function in Resctipt for this?
|
// why is there no standard function in Resctipt for this?
|
||||||
let typedToArray: Js.TypedArray2.Float64Array.t => t = %raw(`a => Array.from(a)`)
|
let typedArrayToArray: Js.TypedArray2.Float64Array.t => t = %raw(`a => Array.from(a)`)
|
||||||
typedToArray(typed)
|
typedArrayToArray(typedArray)
|
||||||
}
|
}
|
||||||
|
|
||||||
let getNonFinite = (t: t) => Belt.Array.getBy(t, r => !Js.Float.isFinite(r))
|
let getNonFinite = (t: t) => Belt.Array.getBy(t, r => !Js.Float.isFinite(r))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user