Sha256: a21cbef7c4e6c8ebffa50b5173fd9f347feafbf3c7a6c4f26d0b688a3314bebf
Contents?: true
Size: 385 Bytes
Versions: 106
Compression:
Stored size: 385 Bytes
Contents
// Returns the square root of a number. // @param {Number} $x // @example // sqrt(2) // 1.41421 // sqrt(5) // 2.23607 @function sqrt ($x) { @if $x < 0 { @warn "Argument for `sqrt()` must be a positive number."; @return null; } $ret: 1; @for $i from 1 through 24 { $ret: $ret - (pow($ret, 2) - $x) / (2 * $ret); } @return $ret; }
Version data entries
106 entries across 106 versions & 3 rubygems