Skip to content

Commit

Permalink
Defined signature(::BitIndex{Q})
Browse files Browse the repository at this point in the history
  • Loading branch information
brainandforce committed Jun 11, 2024
1 parent 976b4ed commit 1002d9d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## Changed
### Added
- Definition of `signature(::BitIndex{Q})`.

### Changed
- Split up `src/math.jl` to separate files in `src/math/`.

## [0.1.5] - 2024-06-10
Expand Down
2 changes: 2 additions & 0 deletions src/bitindex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ end

#---Other useful functions-------------------------------------------------------------------------#

signature(::BitIndex{Q}) where Q = Q

signbit(i::BitIndex) = !iszero(i.i & signmask(UInt))
sign(i::BitIndex) = Int8(-1)^signbit(i)

Expand Down

0 comments on commit 1002d9d

Please sign in to comment.